# Discord Bot Integration Guide

Use this link to [**add the humanID Discord Bot to Your Server**](https://discord.com/api/oauth2/authorize?client_id=1133181278498336808\&permissions=8\&scope=applications.commands%20bot)

## **Discord Bot** <a href="#id-41jwgni3e6t2" id="id-41jwgni3e6t2"></a>

humanID’s Discord Bot offers a 100% anonymous option for Discord authentication. Protect your server from duplicate and fake accounts, data leaks/theft, and abusive users with a more secure method of authentication. humanID is a product of the nonprofit [Foundation for a Human Internet](https://www.human-internet.org). We guarantees that our Discord authentication bot is anti-spam, anti-raid, and anti-bot with no other motive than to preserve online communities. We never harvest personal data. &#x20;

## :warning:**Requirement**:warning:  <a href="#tgiel4sof9kg" id="tgiel4sof9kg"></a>

**You should have administrative privileges on the Discord Server that's trying to integrate the Discord Bot** 🚨

## **Integration Steps (Takes 5-10 minutes )**

### **Option 1: Integrate automatically using the Discord bot (Recommended)**

1. [**Add the bot to your server**](#fajjxqi6e3if)
2. [**Register using the bot**](#register-with-humanid-using-the-discord-bot)
3. (Optional) [**Configure the Verified Role**](#configure-the-verified-role)

### **Option 2: Integrate using the humanID Developer Console**

1. **The bot integration process can be done through either the** [**Discord desktop application**](https://discord.com/download) **or the web application** 💻
2. [**Finish the Setup in the humanID Developer Console & add your URLs.**](#finishing-the-setup-in-the-humanid-developers-console)
3. [**Add the Bot to Your Discord Server**](#fajjxqi6e3if)
4. [**Configuring the Verified Role**](#configure-the-verified-role)

### **2a. Find Your Discord Server's ID**

* Why:
  * This record helps us identify the server that you manage, so we can provide authentication services accordingly.&#x20;

1. In a signed-in Discord server, click on the gear icon&#x20;

   <div align="right"><figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FV97Wcp2dJTsaGjynZ3bS%2FScreenshot%202023-08-30%20at%201.08.43%20PM.png?alt=media&#x26;token=981a9877-884d-411f-b5ee-e7411e0fa807" alt=""><figcaption></figcaption></figure></div>
2. Scroll down to the **Advanced** section then turn on **Developer Mode**

   <figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FSHzrRP5K8VXA1rmYH8Ym%2FScreenshot%202023-08-30%20at%201.16.04%20PM.png?alt=media&#x26;token=2077634a-5bf0-471c-a5df-a092b88f47eb" alt=""><figcaption></figcaption></figure>
3. Come back to the server's main page. Above the text channel list, **right-click** on the server's name and select **Copy ID**

<div align="center" data-full-width="true"><figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2Fh6NHcuzLErbyCMdKBGvn%2Fserver_id.gif?alt=media&#x26;token=bc6463ab-f565-4c16-a13c-052a74873004" alt=""><figcaption></figcaption></figure></div>

### 2b. Register with humanID and find your Credentials&#x20;

* Why:
  * Allows us to connect your server to humanID, so we are able to verify (or block) individual users for your Discord Server.&#x20;
  * Verifies that you registered your server with our [core authentication service](https://docs.human-id.org/web-sdk-integration-guide#api-documentation), so your bot can interface with the core humanID service.

#### **Find humanID Client ID and humanID Client Secret in the** humanID Developer Console&#x20;

1. Register via the [humanID Developer Console](https://developers.human-id.org/home/)
2. Create a new project
   1. THIS IS IMPORTANT - choose the project name as it will appear to your end users. We will ask your users to "Log into xyz" - what's xyz for you? For example, your Discord server's name could make sense.&#x20;

      <div align="left" data-full-width="false"><figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FRxAlMTfXzmg72U2fawLx%2Fimage.png?alt=media&#x26;token=937d95ea-e442-4b06-8e1a-06a877b0eeec" alt=""><figcaption></figcaption></figure></div>
3. Click on **Create New Credentials**

   <figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FP15QabNti3y3AG2Zkw78%2FScreenshot%202023-08-30%20at%209.13.12%20PM.png?alt=media&#x26;token=48ba6c1b-f090-4181-9271-f8ebd911ad0a" alt=""><figcaption></figcaption></figure>
4. In this step, enter any 'Credential Name' you like, and choose '**Production**' and '**Server**'. &#x20;

Make sure paste your Server ID from Discord into the "Server ID" text field.

<figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2Fl9xzsnXL2AHqcVrLdMYe%2FScreenshot%202024-04-15%20at%2012.03.55%E2%80%AFPM.png?alt=media&#x26;token=52ea9503-07d1-44be-9420-fea683221464" alt=""><figcaption></figcaption></figure>

### Finishing the Setup in the humanID Developers Console

After creating the credentials, click on **Edit Redirect URLs o**n the bottom-right side of the project page:&#x20;

<figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FtOdLgpyGCH7sdEXFKuMv%2FScreenshot%202023-08-30%20at%209.14.29%20PM.png?alt=media&#x26;token=0f2b37ed-d45b-407f-86fe-057cd84ee974" alt=""><figcaption></figcaption></figure>

* For 'Successful URL', paste in the following: <mark style="color:blue;">**`https://verify.discord.human-id.org/verification_successful`**</mark>
* For 'Failed URL', paste in:<mark style="color:blue;">**`https://verify.discord.human-id.org/verification_failed`**</mark>
* Don't forget to save the update.

### Adding the bot to your server <a href="#fajjxqi6e3if" id="fajjxqi6e3if"></a>

1. **If you are not the owner of the server, you can ask the owner to do so, and grant you** [**administrator privileges**](https://www.youtube.com/watch?v=4BR5CEwZ0xw\&t=40s)**.**&#x20;
2. **Click this link:** [**“Add the humanID Discord Bot to Your Server”**](https://discord.com/api/oauth2/authorize?client_id=1133181278498336808\&permissions=8\&scope=applications.commands%20bot) **. This** [**button** ](https://discord.com/api/oauth2/authorize?client_id=1133181278498336808\&permissions=8\&scope=applications.commands%20bot)**will take you to the Discord website. Please ensure that you are logged into the correct Discord account.**
3.

```
<figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FaKvfZGEr70WmBKfPlstF%2FScreenshot%202023-08-29%20at%209.46.50%20PM.png?alt=media&#x26;token=448b2194-b0f8-4474-97e8-e8cc946a0e9c" alt="" width="375"><figcaption></figcaption></figure>
```

4. **Under the "Add to Server:" section, choose the Discord server that you wish the humanID Discord Bot to live in.**
5. **When asked to confirm granting the humanID Discord Bot Administrator access, confirm and click on Continue.**
6. **Finish any final authorization step to add the bot.**

#### :tada:**Congratulations - you're ready to build a community of humans, without compromising your users' privacy or having to handle private data yourself!**

### Adjust the configuration of the verified Role

#### After adding the humanID Verification Bot to your server, the bot will create a "humanID-verified" role that users can take on. We want to give you the autonomy to configure that role to give your server members access that you feel comfortable with.

### Default Permissions of the humanID-verified Role

By default, the bot will give the following permissions to the humanID-verified Role:

* View Channels
* Change Nickname
* Send Messages
* Send Messages in Threads
* Create Public Threads
* Embed Links
* Attach Files
* Add Reactions
* Use External Emoji
* Read Message History
* Use Application Commands

**Grant access to private channels**

* [ ] By default, unverified users can only view public channels in the servers. You can assign "humanID-verified" role to any private channel.&#x20;

**Manually change permissions of verified users**

* [ ] Head over to the Server Settings panel&#x20;
* [ ] &#x20;<img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FoRfCZfAiEDssiCjc3Rf8%2Fsettings.gif?alt=media&#x26;token=b1a2811b-c40f-4f6b-bbd4-47d7ac21ef02" alt="" data-size="original">
* [ ] Make sure that the "humanID-verified" role is adjusted to sit underneath the ***humanID Verification*** role (different from the previous "verified" role)
*

 <figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2Fh1LjCUdx0DCzhj2JrHok%2Fswitch%20place.gif?alt=media&#x26;token=019b9699-9064-4127-b094-d9e3ade56d1a" alt=""><figcaption></figcaption></figure>

* [ ] Click on the "humanID-verified" role to toggle on capabilities that you'd like to give members
*

 <figure><img src="https://2726894056-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbbSWPPdzqwBMlWppLN%2Fuploads%2FLZGvWgj8TbYQzrPvLflG%2Fpermissions.gif?alt=media&#x26;token=0ba94eef-9207-46ca-81f5-4e3f77d12ba6" alt=""><figcaption></figcaption></figure>

* [ ] Permission changes are saved automatically. Congratulations, you've successfully set up the humanID Verification bot! Enjoy😊

## Register with humanID using the Discord Bot

Once you have added the bot to your server with the correct permissions please follow these steps (if you are indeed the server administrator):

1. Navigate to the #get-verified channel (should have been made for you by the bot when you installed)
2. Use the /register command followed by your email address
3. The bot will respond by sending your email an activation link so we can verify the email address
4. After clicking the link you will be redirected back to discord and your server will be ready to use the /verify command!
