😟 Sorry, we’re closed
View Categories

💬 Discord oAuth Setup

1 min read

Please follow this guide to setup and incorporate Discord oAuth support for Creation Crew Center. 

 

First, you need to [create a developer application](https://discord.com/developers/applications) on the Discord website. If you have already created this application to use the rich presence of vmsACARS, you can use the same one.

 

Next, go to OAuth2 > General. Copy the client ID and client secret to be used in the configuration later. Additionally, you need to add a redirect; the URL to add is `https://yourdomain.com/oauth/discord/callback`

 

In the `.env` file, add the following:

DISCORD_OAUTH_ENABLED=true

DISCORD_CLIENT_ID=’your_client_id_copied_before’

DISCORD_CLIENT_SECRET=’your_client_secret_copied_before’

Notice: Some servers work fine with the calls being in “” brackets. However some servers may require ‘’ instead.

 

Now, your users can link their Discord account to their phpVMS account and use their Discord account to log in. The link between the two accounts is automatically established when clicking the “Login with Discord” button on the login page. However, if the email address of the Discord account is different from the email address of the phpVMS account, it must be done manually on the profile page.

 

## Sending Private Messages

If you want to send private message notifications to your users (development still in progress), you need to create a Discord bot in the bot section of your Discord application and copy the token. 

 

If this option is not enabled, the `discord_private_channel_id` field will not be filled. This field contains a unique discussion ID between the bot and the user, so it is imperative to have a bot to fill it.

Place the token in the `.env`

DISCORD_BOT_TOKEN=”your_bot_token_copied_before”

Give us a call

Available from 8am to 6pm, Monday to Friday.

02392 982212
Send us a message

Send your message any time you want.

Whatsapp us!
Our usual reply time: Up to 30 minute(s)
Facebook Message us!
Our usual reply time: Up to 1 Hour(s)