> For the complete documentation index, see [llms.txt](https://docs.centox.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.centox.io/login-providers/discord.md).

# Discord

<details>

<summary><mark style="color:blue;">Step 1:</mark> Create a Discord Application</summary>

To start, create a **Discord bot**. \
This is done through this link: <https://discord.com/developers/applications>

<img src="/files/NEqumBpXXxHgtlwF9xa1" alt="" data-size="original">

Give your discord-bot a appropriate name & and add a logo.

Follow <mark style="color:blue;">**Step 2**</mark> - for adding a correct **url-redirict** link for your application.&#x20;

</details>

<details>

<summary><mark style="color:blue;">Step 2:</mark> Add an url-redirect for your application</summary>

The next step is to add a **url link** to the bot a user goes to after they have **logged in.** \
This is a necessary step for your **Discord bot** to work.

<img src="/files/AH77HvE66761OQYxvbpa" alt="" data-size="original">

Click <mark style="background-color:blue;">**"Add redirect"**</mark> under the category <mark style="background-color:blue;">**"OAuth2"**</mark>

### What link should be inserted?

Here you need to **insert** the following link:\
`https://<yoururl>.centox.io/api/auth/login/discord/callback`

Be sure to click <mark style="background-color:red;">**"Save Changes"**</mark> at the bottom.

### An example where the name of your forum is "<mark style="color:blue;">demo</mark>"

If the link to your forum is <mark style="color:orange;">**demo.centox.io**</mark>, insert the following link:\
`https://demo.centox.io/api/auth/login/discord/callback`

Follow <mark style="color:blue;">**Step 3**</mark> - on how to insert your Discord bot information into Centox.

</details>

<details>

<summary><mark style="color:blue;">Step 3:</mark> Insert the Discord bot credentials into your Centox project</summary>

The next **step** is to copy information from your **Discord bot** into your project on <mark style="color:blue;">Centox.</mark>

Copy the **"Client ID"** & **"Client Secret"** into your project on Centox. Both of these pieces of information can be found under the "OAuth2" category of your discord bot.

<img src="/files/08FY8DyBp94WQAZCGxxE" alt="" data-size="original"><br>

To copy them into your Centox project, you need to access the admin page for your project. \
And go to **Settings** -> **General** -> **Enable Provider**

<img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGRDiw4P8uVibYkc3wqxQ%2Fuploads%2FxecpYYM07aVAJzb6ukRE%2F5-done.jpg?alt=media&#x26;token=569a392a-baae-4fc8-a7de-ad3367049f93" alt="" data-size="original">

**Once you have successfully copied them in, make sure to click "Enable Provider"**\
\
Follow <mark style="color:blue;">**Step 4**</mark> - on how to check if your bot **works** when users try to **log in**.

</details>

<details>

<summary><mark style="color:blue;">Step 4:</mark> Check if you can log in via Discord on your forum</summary>

</details>
