Skip to main content

How to Connect Discord and Google Accounts to X02

A complete guide to linking your Discord and Google accounts with X02 for seamless 1-click logins, bot integrations, and secure account management.

By X02 Team · · Tutorial, Authentication, Discord, Google, Security, Beginners

Managing passwords across dozens of services is tedious. To make accessing your files and media library fast and effortless, X02 supports Account Connections for Discord and Google.

By linking your Discord or Google accounts, you unlock:

[!TIP] Quick Navigation:


Part 1: The Easy Guide (For Everyone)

Linking your social accounts takes less than 10 seconds directly from your dashboard.

Architecture Diagram


Linking Your Discord Account

Where to Go Direct Link Action
Dashboard Settings Account Connections Open Dashboard Settings Click Connect Discord
  1. Log in to your account at x02.me and open your Dashboard.
  2. Navigate to Settings and find the Account Connections section.
  3. Next to Discord, click Connect Discord.
  4. A secure Discord authorization window will appear. Click Authorize.

Once approved, you will see a green Linked badge. You can now use the Continue with Discord button on the login screen anytime.


Linking Your Google Account

  1. Go to Dashboard Settings Account Connections.
  2. Next to Google, click Connect Google.
  3. Choose your Google account in the secure popup.
  4. Confirm authorization.

Your Google account is now linked, enabling 1-click Continue with Google sign-in.


How to Disconnect a Linked Account

If you want to unlink a Discord or Google profile from your X02 account:

  1. Open Dashboard Settings Account Connections.
  2. Click Disconnect Discord or Disconnect Google.
  3. Confirm the action.

[!NOTE] Your Files Are Always Safe: Disconnecting a social account never deletes your uploaded files, custom subdomain settings, or API keys. You can always reconnect at any time or log in using your standard username and password.


Part 2: The Developer & Power User Guide

For developers curious about how authentication and account linking are handled behind the scenes:


1. OAuth 2.0 Flow Under the Hood

X02 follows the standard OAuth 2.0 authorization code grant flow:

Architecture Diagram

  1. CSRF State Verification: When linking from the dashboard, a cryptographically random state parameter prevents cross-site request forgery attacks.
  2. Account Association: The provider's unique ID (discordId or googleId) is securely stored in your user database record alongside verified email metadata.
  3. No Password Sharing: X02 never accesses, sees, or stores your external Discord or Google passwords.

2. Disconnecting Accounts via REST API

If you are managing user sessions programmatically:

Disconnect Discord Endpoint:

curl -X POST "https://x02.me/api/discord/disconnect" \
  -H "x-api-key: YOUR_X02_API_KEY" \
  -H "Content-Type: application/json"

Disconnect Google Endpoint:

curl -X POST "https://x02.me/api/google/disconnect" \
  -H "x-api-key: YOUR_X02_API_KEY" \
  -H "Content-Type: application/json"

Successful JSON Response:

{
  "success": true,
  "message": "Account disconnected successfully"
}

3. Discord Bot & Ticket System Synchronization

Linking your Discord account directly pairs with the X02 Discord Ticket System (/discord-tickets).

When linked:


Security Best Practices

Recommendation Why It Matters
Enable 2FA on Google & Discord Because social login gives instant access to your X02 dashboard, protecting your linked accounts with Two-Factor Authentication secures your file library.
Keep a Backup Password Setting a strong local password ensures you can always sign in even if an external provider experiences temporary downtime.
Review Connected Apps Periodically Periodically check your Account Connections in settings to remove unused or old third-party logins.

Next Steps & Related Tutorials

What to learn next Guide Link
Get your personal API key for scripts & tools How to Get an API Key
Integrate ShareX for instant screenshot uploads How to Integrate ShareX with X02
Switch between Short URLs and Subdomains How to Switch Between Short URLs and Subdomains
Organize your media with custom folders How to Organize Files with Folders

Read this article on X02