Discord Authorization Token: Format, Browser Injection, Flagging

@editorial ·

A Discord authorization token is a three-segment string shaped like base64.userId.hmacSignature, sent in the Authorization header on requests to discord.com/api/v10/users/@me.

You inject it into a browser by opening DevTools, pulling it from localStorage under the token key, and replaying it through the console or a custom header extension.

It survives a handoff only while the fingerprint, IP and client-build headers match, so it breaks exactly where those drift. The sections below cover the byte-level structure, the server-side validation path, and the failures behind 401 Unauthorized, 403 Forbidden and 429 Too Many Requests.

In short
Format: base64.userId.hmacSignature, no Bearer prefix.
Validate: GET discord.com/api/v10/users/@me, a 200 means alive.
Survive: X-Super-Properties, User-Agent, cookies and IP must match.

Discord Authorization Token: What It Actually Is

The three-segment token structure decoded at byte level

Split the string on the dot character and you get an encoded payload, the numeric user ID, and an HMAC signature. The signature covers the first two segments, so editing either the payload or the ID breaks verification instantly.

Base64url decoding of the payload segment

The first segment is base64url, where - and _ replace + and / and padding is stripped. Decoded, it is plain JSON readable offline, with no request sent.

Decode the payload locally
echo "PAYLOAD" | tr '-_' '+/' | base64 -d
{"user_id":"...","username":"...","premium_type":0,"mfa_enabled":false,"token_type":0}

MFA token type 1 versus standard token type 0

The payload carries a token_type marker: type 0 for a standard session, type 1 for an MFA-scoped token issued after an RFC 6238 TOTP exchange. The type 1 variant expires faster and is revoked outright on a password change.

Where the shared secret ships with the account, a TOTP two-factor code generator supplies the second factor.

Why a token that works in one client dies in another

Discord checks the token against a stored session record, not against the string alone. A different client build, a different IP reputation or a cookie-less browser flips a 200 into 401 Unauthorized.

Rotating a VPS residential IP proxy pool does not fix it either: TLS fingerprinting still exposes the gap between your client and the fingerprint the token was issued against.

Failure chain
fresh browser profile to 401 Unauthorized.
same token plus matching X-Super-Properties to 200 OK.
same token from a residential IP to 403 Forbidden or a captcha challenge.

Ready-made tokens still need that alignment. See the Discord accounts sold with ready-to-use authorization tokens and the full Discord catalog of accounts and token variants.

Request Architecture: How Discord Validates a Session

The Authorization header and the X-Auth-Token alternative

Authenticated REST calls send the raw token in an Authorization header with no Bearer prefix. Some clients and community tooling use X-Auth-Token or X-Discord-Authorization instead, and the server accepts all three interchangeably.

The wss://gateway.discord.gg WebSocket Gateway authenticates with that same token, which is how discord.js and discord.py selfbot logins open a session.

X-Super-Properties and the client.build_number spoof

X-Super-Properties is a base64url-encoded JSON blob describing the client build, browser and OS fingerprint. The field checked most often when a token suddenly fails is client.build_number inside it.

Spoofing means copying the build number, OS string and browser from the issuing client, then re-encoding the blob into the header. Mismatched fields are the most common reason a working token starts returning 401.

Live clients can also be read over the Remote Debugging Protocol through chrome://inspect, where IndexedDB and the Service Worker cache expose session state that a cleared localStorage panel no longer shows.

The /users/@me endpoint and the /auth/login and /auth/logout lifecycle

GET discord.com/api/v10/users/@me is the canonical identity check: a 200 returns the profile, a 401 means the token is dead. POST discord.com/api/v10/auth/login with email or phone plus password issues a fresh session.

POST discord.com/api/v10/auth/logout invalidates the session and kills every copy of that token everywhere. Automated logins trip a 3DSecure or hcaptcha challenge, and bursts of checks trip 429 Too Many Requests rate limiting.

Cookie state: __dcfduid and __sdcfduid

Responses hand out __dcfduid and __sdcfduid device-tracking cookies. A browser missing both while presenting a foreign token is an immediate anomaly signal to Cloudflare and Akamai edge bot-management fingerprinting.

Session state also lands in localStorage under the token, userData and fingerprint keys, and is mirrored into IndexedDB and the Service Worker cache, so a clean storage panel can still hide a live session.

Replay with curl or HTTPie
curl -H "Authorization: <token>" -H "User-Agent: <client UA>" -H "X-Super-Properties: <blob>" -H "Cookie: __dcfduid=<id>; __sdcfduid=<id>" https://discord.com/api/v10/users/@me

Any token delivery should run through Accira Escrow buyer protection and the inspection warranty and replacement policy, because live token validity is the one thing a screenshot cannot prove.

The same delivered-token model applies on other platforms, for example Twitter accounts with an auth_token and 2FA, 2006-2018 stock with Microsoft email and auth token, and 2019-2025 packages with Hotmail email, token and 2FA.

Step-by-Step: Extracting the Token in a Standard Browser

Extraction quick reference
Primary store: localStorage keys token, userData and fingerprint on the https://discord.com origin
Fallback: IndexedDB databases plus the Service Worker cache
Fastest read: Network panel, fetch/xhr filter on /api/v10/users/@me, copy the Authorization header
Rotate anything you screenshot

DevTools storage inspection for the localStorage token key

Open DevTools, go to the Application panel, expand Local Storage and select the https://discord.com origin. The web client keeps one record with three sibling entries: token, userData and fingerprint.

The token is a three-segment string, base64.userId.hmacSignature: segment one base64url-decodes to JSON profile metadata, segment two is the numeric user ID, segment three is the signature.

Copy userData and fingerprint with it, because they pin the browser profile the token was minted in, and Discord compares the session against that stored device identity on every bootstrap.

Finding the token when localStorage is empty: IndexedDB and Service Worker caches

When Local Storage is empty, the session often survives in the IndexedDB databases and the Service Worker cache. Search the origin's databases for a serialized session payload and check cached API responses; the token frequently remains there even after you purge the panel cache.

Correlate findings with the X-Super-Properties request header and with the Set-Cookie: __dcfduid and __sdcfduid values issued by the auth endpoints.

Reading the request headers from the Network panel instead

The Network panel is the fallback: filter fetch/xhr, open the calls to discord.com/api/v10/users/@me and read the Authorization header from the request detail. The header is authoritative, since it shows the exact string the server accepts, including variants such as X-Auth-Token and X-Discord-Authorization.

Reading a token from a device you cannot log into

On a device you cannot log into, attach over the Remote Debugging Protocol via chrome://inspect and evaluate the storage read in the page context, so the value never touches a login form. For bulk handoffs, Accira Escrow buyer protection for token deliveries keeps every transfer auditable.

Injecting the Token: Console, Extensions and Antidetect Browsers

Direct localStorage write and the console injection snippet

The simplest injection is a localStorage write of the token value plus a reload, which re-authenticates the page exactly like a native login.

Console injection snippet
localStorage.setItem('token', 'TOKEN_VALUE'); localStorage.setItem('userData', 'USER_DATA_JSON'); location.reload();
fetch('/api/v10/users/@me', { headers: { Authorization: 'TOKEN_VALUE' } }).then(r => r.json()).then(u => console.log(u.username, u.id));

Chrome extensions that inject a custom Authorization header

Header-modifying Chrome extensions work for sites that read the token from fetch and XHR calls, but they only affect requests carrying the injected header, and their fetch instrumentation signature is visible to the client and to edge bot management alike.

Antidetect browser JSON and cookie formats

An antidetect profile stores the session as JSON: the localStorage token, userData and fingerprint, the __dcfduid and __sdcfduid cookies, the User-Agent string, and matching timezone and WebGL values. A token carried without the full bundle is inconsistent by construction and gets challenged on first contact.

CDP-driven replay over the Remote Debugging Protocol

Chrome DevTools Protocol replay through chrome://inspect lets you attach to a remote browser, evaluate scripts in the page context and drive authenticated calls without writing the token to disk.

curl and HTTPie replay
curl -s -H "Authorization: TOKEN_VALUE" -H "User-Agent: MATCHED_UA" https://discord.com/api/v10/users/@me
http GET https://discord.com/api/v10/users/@me Authorization:TOKEN_VALUE User-Agent:MATCHED_UA

Keep client.build_number aligned with the spoofed User-Agent or the client rejects the build outright. Two-factor accounts need an RFC 6238 TOTP code from the seeded secret, and an MFA token type 1 differs from a plain type 0 token in which endpoints it unlocks; generate codes with the TOTP two-factor code generator.

A 3DSecure or hcaptcha challenge must be solved before the session completes, and a discord.js or discord.py self-bot login is the fastest test against the wss://gateway.discord.gg WebSocket Gateway, though self-bot traffic is itself a common automated-action trigger.

Verifying a Session Before You Hand It Off

The two-call verification pattern

Verification is two calls: GET discord.com/api/v10/users/@me for identity, then a harmless GET to discord.com/api/v10/users/@me/guilds to prove the token carries real session scope rather than a login-page token.

Reading 401 Unauthorized versus 403 Forbidden

  • 401 Unauthorized — the token is rejected or expired; fix it by re-minting the session through discord.com/api/v10/auth/login, not by changing headers.
  • 403 Forbidden — the token is valid but the account lacks permission, or the request looks like automation.

The 403 case is where Cloudflare and Akamai edge bot-management fingerprinting surfaces: a session whose User-Agent, client.build_number and TLS fingerprinting profile disagree with the minted bundle gets challenged or denied. Residential IP proxy rotation from a VPS removes the datacenter ASN half of that signal.

Reading 429 Too Many Requests and the retry_after field

A 429 Too Many Requests carries retry_after in the body. Retrying before that interval expires is the fastest way to escalate a rate-limit bucket into a flag, so sleep the full delay and halve the request rate before resuming.

Confirming the account is not in a locked or review state

Confirm there is no pending verification, quarantine or locked state before a transfer, because a flagged token is worthless to the buyer.

The Accira inspection warranty and replacement policy covers that gap on Discord accounts sold with ready-to-use authorization tokens, and the full Discord catalog lists the available token variants per account age.

Diagnostics: Common Errors and What They Actually Mean

Triage order: code, structure, build, cookies, egress, token
401 is identity, 403 is reputation, 429 is volume. Only when the first five checks pass is the credential itself the suspect.

Token works in one client and fails in another

A token that still authenticates in the session that minted it but returns 401 Unauthorized from a fresh browser is almost never dead. The desktop client pins a client.build_number inside X-Super-Properties, and once Discord rotates the accepted build, requests carrying the stale value fail the check.

Replay the same header set
curl -s https://discord.com/api/v10/users/@me -H "Authorization: TOKEN"
http GET https://discord.com/api/v10/users/@me Authorization:"TOKEN"
curl -s https://discord.com/api/v10/users/@me -H "X-Auth-Token: TOKEN" -H "X-Discord-Authorization: TOKEN"

If the replay returns your own user id, the credential is valid and only the client fingerprint was wrong. Decode the middle segment of the three-segment base64.userId.hmacSignature structure with Base64url to confirm the id and creation time. A token type 1 value means a second factor is pending; a token type 0 value is a plain user token.

Capture the real header set instead of guessing it. Remote Debugging Protocol (chrome://inspect) exposes the live values, while Service Worker cache and IndexedDB inspection often surface a credential that the localStorage keys token, userData and fingerprint no longer show.

Selfbot detection heuristics and the discord.js / discord.py paths

Selfbot automation through discord.js or discord.py is detected by behavioral timing, a User-Agent that does not match the advertised client build, and message patterns. The outcome is a banned token and a terminated account, not a muted one.

No header rewrite changes that. The flag is session behaviour, and a valid Authorization: <token> header removes only one signal. Logging in through a library's self-token path breaches the terms of service, and the account is written off.

Captcha and 3DSecure challenges appearing mid-session

Captcha and 3DSecure challenges appearing mid-session mean the edge layer judged the session untrustworthy. An hcaptcha solving flow restores the session, but that treats a symptom of bad fingerprint-to-IP alignment rather than repairing it.

A burst of 429 Too Many Requests is a different fault: it is volume. Back off and reuse the same egress instead of rotating IP inside the retry loop.

A structured triage checklist

  • HTTP code — 401 identity, 403 reputation, 429 volume
  • Token structure — three segments, Base64url payload decodes to your user id
  • Build number — compare client.build_number in X-Super-Properties against a live client
  • Cookies — __dcfduid and __sdcfduid must match the session that minted the token
  • Egress — same residential address as the minting session
  • Token — suspect only when every check above passes

Confirm the delivery variant before you build a workflow around it: Discord accounts sold with ready-to-use authorization tokens sit alongside other credential formats in the full Discord catalog.

Domain, IP and TLS Traps That Trigger Flags

Cloudflare and Akamai edge bot-management fingerprinting

Discord's edge sits behind Cloudflare and Akamai bot management. Both fingerprint TLS handshake characteristics, HTTP/2 frame ordering and header order, then combine that signal with the IP reputation of the request.

The practical consequence: a request that looks clean when replayed by hand can still be challenged, because a manual replay reconstructs a fresh TLS session with the wrong handshake characteristics.

User-Agent and client-build spoofing done wrong

Spoofing the User-Agent string alone is not enough. The TLS fingerprint and the header order of the client must agree with the advertised browser, or the disagreement itself becomes the signal.

Discord clients also send X-Super-Properties: a Base64-encoded JSON blob carrying client.build_number, OS version and launch id. A current User-Agent paired with a build number from two years ago is a contradiction the edge reads directly.

Residential proxies, VPS hosts and rotation policy

Datacenter and VPS ranges are classified as hosting providers and carry a far worse trust baseline than residential addresses. The same token and the same header set can pass on one network and fail on another.

Rotation should be slow and stable per session. A single token hopping between unrelated residential addresses across regions is a stronger flag than a static but clean address.

TLS fingerprinting and the mismatch it exposes

TLS fingerprinting is a hash of the ClientHello. A Chrome header set sent from a Python requests stack, a Go client or an OpenSSL default build produces a fingerprint matching no browser at all.

The wss://gateway.discord.gg WebSocket Gateway carries the same identity and fingerprint, so a gateway connection from a different IP than the REST session is one of the clearest automation tells.

One session, one egress, one build
Keep the gateway connection and REST traffic on the same path with the same client build. Never mix a live token with a mismatched fingerprint profile.

Operational Security for Token Delivery and Handoff

What to ship with the token and what to strip

Ship the token, the original email or phone credential, the 2FA secret and a written build note. Strip the session cookies, the device fingerprint and the minting IP: they belong to the seller and will trigger the edge on the buyer's first request.

Binding a credential to its recovery path is the pattern to copy. Twitter 2006-2018 stock with Microsoft email, auth token and 2FA and the 2019-2025 package with Hotmail email, token and 2FA package the credential together with the factor that unlocks it.

Rotating a token after every use

Reset the Discord auth token when the account changes hands. The previous session stays valid, and concurrent use of one token from two networks is itself a flag trigger. POST https://discord.com/api/v10/auth/logout drops the current session, and a fresh login through discord.com/api/v10/auth/login mints a new credential.

Where 2FA is enabled, login returns an MFA token type 1 value until the RFC 6238 TOTP code is submitted. Generate TOTP two-factor codes online for token logins that require 2FA, then submit the six-digit code before the session is usable.

Keeping the buyer's first session clean

A fresh browser profile with a matching fingerprint, clean cookies including __dcfduid and __sdcfduid, and a residential egress gives the buyer the smoothest first session. Reusing the seller's profile ships the seller's fingerprint history along with it.

Verified delivery removes the first-request support ticket, because a token dead on arrival is indistinguishable from a scam until a third party checks it. Accira Escrow holds payment until the buyer confirms the login works, and the inspection warranty covers the window right after that confirmation.

Never logging tokens

Never write tokens into scripts, shells, CI logs, support tickets or screenshots. A token in a log file is a token in someone else's hands, and shell history plus CI artifacts outlive the account itself.

Keep credentials in environment variables or a secrets manager, redact the Authorization header before logging, and rotate immediately after any log has touched a live token.

Choosing an Account on Accira: Escrow, Warranty and Verification

Pre-release checklist
Step 1: read the listing for account age, token origin, country, email domain and 2FA inclusion.
Step 2: buy through escrow so the token can be probed before funds clear.
Step 3: confirm it with a single GET discord.com/api/v10/users/@me call and read the status code.
Step 4: call POST discord.com/api/v10/auth/logout to rotate and destroy the residual session.
Step 5: deliver over one residential IP with one client fingerprint.

What to look for in a Discord listing

A complete Discord listing with a ready-to-use authorization token should disclose five attributes, because each one changes the handoff procedure. The one that matters most is token origin: an issued value behaves differently from a re-minted one after a credential change, and the two carry different expiry behaviour.

  • Account age — young tokens draw closer attention from Cloudflare and Akamai edge bot management.
  • Token origin — issued at signup versus re-minted after a credential reset, which can also mean an MFA token instead of a standard one.
  • Country and email domain — the email domain and the exit IP must not contradict each other, or the X-Super-Properties payload and the IP look foreign to one another.
  • 2FA inclusion — a package carrying the TOTP secret can be re-logged; without it, discord.com/api/v10/auth/login has no second factor to satisfy.
  • Session state — whether the token was left active and possibly already bound to a wss://gateway.discord.gg socket.

Masked token anatomy
Segment 1, base64url payload: ZXhhbXBsZS5wYWNrYWc=
Segment 2, user id: 417293847561
Segment 3, HMAC signature: 9f1c2a4b7e3d
Base64url-decode segment 1 to read the token type. Never paste a full token into a ticket or chat.

Why the escrow and warranty layer reduces token risk

Escrow changes the order of operations: the buyer receives the token, the buyer probes it, and only then does the money move. That single reordering removes the dominant failure mode, which is paying for a token that was invalidated between listing and delivery.

The inspection warranty and replacement policy covers the harder case, where the token passes the probe but dies on the buyer's first real login.

A 401 Unauthorized on the first call after a successful /users/@me usually means the credential was rotated or the account was re-flagged, and a replacement path turns that from a sunk cost into a queue item.

Verification under escrow should be scripted rather than a manual login. One Authorization request to discord.com/api/v10/users/@me returns the id, username and creation date, which is enough to prove the token maps to the purchased account and that the account is not flagged.

A 429 Too Many Requests here is a probe-method problem, not a verdict on the token: back off, replay once, and keep the request count at one from the same residential IP.

Verification request
curl -H "Authorization: TOKEN_VALUE" -H "X-Super-Properties: BASE64JSON" https://discord.com/api/v10/users/@me
Read: 200 plus a payload with id and username, 401 for a dead token, 403 Forbidden for a restricted or flagged account.

Adjacent packages with the same auth-token delivery model

The auth_token plus 2FA packaging is not Discord-specific. Comparing it against Twitter stock delivered with a Microsoft email, auth token and 2FA makes the packaging differences explicit: escrow, warranty and verification flow identically, and only the endpoint and header name change.

Where a delivery includes a TOTP secret, online TOTP code generation covers the RFC 6238 codes a token login needs, which keeps the handoff independent of the seller's device.

The benchmark to hold any listing to: metadata disclosed, credential delivered through escrow, verification possible before release, a stated rotation step, and a replacement path for a dead token.

Discord Authorization Token: Frequently Asked Questions

What is the format of a Discord authorization token?

A Discord token is three dot-separated segments: a base64url payload, the user id, and an HMAC signature. The client sends it in the Authorization request header, and the first segment Base64url-decodes to the token type. Type 0 is a standard session, type 1 is an MFA session minted after a second factor, and it expires far sooner.

How do I get a Discord authorization token from a browser?

Sign in, open DevTools, and read the token key from localStorage on the discord.com origin, where userData and fingerprint sit alongside it. For instrumented setups, the Remote Debugging Protocol via chrome://inspect returns the same localStorage over CDP, and Service Worker cache and IndexedDB inspection covers tokens held by an installed client. The Set-Cookie values __dcfduid and __sdcfduid are device identifiers, not session credentials.

Why does my Discord token work in one client but fail in another?

Clients send different headers. discord.js and discord.py selfbot token login send X-Auth-Token or X-Discord-Authorization plus a spoofed X-Super-Properties payload, while a raw curl replay sends only Authorization.

If the server expects the properties header, or if the User-Agent and client.build_number contradict the client version, one path accepts the token and another refuses it. A 403 Forbidden in the failing client points at fingerprint mismatch; a 401 Unauthorized means the token itself is dead.

How do I log into Discord with a token using curl or HTTPie?

Send the token in the Authorization header with a current desktop User-Agent and a valid properties payload, then confirm the session and close it.

Token replay
curl -H "Authorization: TOKEN_VALUE" -H "User-Agent: Discord/1.0.9000" -H "X-Super-Properties: BASE64JSON" https://discord.com/api/v10/users/@me
HTTPie http GET https://discord.com/api/v10/users/@me Authorization:"TOKEN_VALUE"
curl -X POST -H "Authorization: TOKEN_VALUE" https://discord.com/api/v10/auth/logout

Rate limits still apply, so treat a 429 Too Many Requests as a backoff signal and replay from one residential IP with one TLS fingerprint rather than rotating mid-session.

What is the difference between a standard Discord token and an MFA token?

A standard token is type 0 and carries the full session lifetime; an MFA token is type 1, minted only after a 3DSecure, captcha or hcaptcha challenge and a TOTP code are accepted.

Because type 1 tokens are short-lived and bound to the challenge, a package shipping the TOTP secret can be re-logged while one without it cannot. RFC 6238 codes from the shared secret reproduce the second factor, so the seller's authenticator is not needed once you hold the secret.

How do I avoid getting a Discord account flagged after a token handoff?

Keep the fingerprint stable for the whole session: one residential IP, one TLS signature, one client build number, and no parallel clients against a single token. If the listing discloses that the token was already bound to a gateway connection, move it rather than reuse it, and rotate a VPS residential IP proxy only between sessions.

After verification, call discord.com/api/v10/auth/logout so no residual session survives the transaction, and answer captcha or 3DSecure prompts through the normal client instead of scripting around them.

All Articles