Skip to main content

Discord

"Discord is the easiest way to talk over voice, video, and text. Talk, chat, hang out, and stay close with your friends and communities."

Configuration​

Getting Discord OAuth credentials​

Start by accessing or creating an Discord account.

If you do not already have a Client Id and Client Secret, you will first need to create them. Start by registering a new application by following these steps.

Select you application, then select "OAuth2" in the settings. Note your Client Id and Client Secret for the next step. You may need to reset your Client Secret.

Set at least one Redirect to the following:

http://localhost

Be sure to click "Save Changes".

Configuring Discord OAuth Credentials in crul​

Navigate to the credentials page in crul (top right corner menu -> credentials).

Click the "create" button.

Select "OAuth" from the type dropdown, then select "Discord" from the provider dropdown.

Copy the Client Id into the Client Id credentials form entry. Then copy the Client Secret into the Client Secret credentials form entry.

Test the credential by running the following query. You should see a populated token.access_token column in the results.

oauth --credential "discord"

Example queries​

These examples use the endpoints described in the Discord API reference.

Example 1:​

Access the authenticated /api/users/@me endpoint. Notice the scope is set using the --scope flag.

oauth --credential "discord" --scope '["identify"]'
|| api get https://discord.com/api/users/@me
--token.access_token "$token.access_token$"