Managed secret providers
Discord
Connect Discord to Alter Vault for secure API access
Overview
Section titled “Overview”Use Discord credentials to make authenticated API calls through Alter Vault without exposing API keys in code.
| Property | Value |
|---|---|
| Provider ID | discord |
| Category | Communication |
| Credential Type | Bearer Token |
Step 1: Get Credentials
Section titled “Step 1: Get Credentials”Log in to the Discord Developer Portal
Log in at discord.com/developers/applications.
Select the application
Select the application (or create a new one).
Go to the Bot section
Go to the Bot section in the left sidebar.
Reset Token
Click ‘Reset Token’ to generate a new bot token (this will invalidate any previously issued token).
Copy the bot token
Copy the bot token.
Step 2: Add to Alter Vault
Section titled “Step 2: Add to Alter Vault”Open the Developer Portal
Go to portal.alterauth.com and navigate to the application.
Add Discord
Go to Managed Secrets > Add Provider > Discord.
Enter credentials
Paste your Bot Token into the credential field.
Save
Click Save. You’ll receive a grant_id to use with the SDK.
Using in Code
Section titled “Using in Code”response = await alter_app.request( HttpMethod.POST, "https://discord.com/api/v10/channels/YOUR_CHANNEL_ID/messages", grant_id="YOUR_GRANT_ID",)