Kruiger Labs
Client Portal Get Started
DocumentationIAA BOT
Sign inGet support
IAA BOT

IAA BOT Discord OAuth2

Configure Discord OAuth2 and keep bot, OAuth, API, and signing credentials separate.

View IAA BOT Product

Do not confuse the credentials#

CredentialPurposeStorage
Discord bot tokenSigns the bot process in to DiscordBot server only.
Discord Application IDPublic identifier for bot and OAuth applicationMay appear in public authorization URLs.
Discord OAuth client secretServer credential for OAuth code exchangeWebsite backend only.
OAuth access tokenRepresents a user’s granted Discord accessEncrypted or protected backend storage.
IAA API keyBearer credential for bot-to-backend requestsBot and backend server environments.
IAA signing secretHMAC key for request integrityBot and backend server environments; separate from API key.

OAuth configuration#

  1. Add the exact HTTPS callback URL in the Discord Developer Portal OAuth2 settings.
  2. The website sends the user to Discord authorization with the required scopes and a protected state value.
  3. Discord redirects the user to the server-controlled callback with a short-lived code.
  4. The backend validates state and exchanges the code using the client secret server-side.
  5. The backend associates the authenticated Discord user ID with the authorization record.
  6. Store refresh tokens securely only if continued access requires them.
  7. Provide revocation and account-data deletion behavior.

Secret storage#

Back to top