Discord action Add Role to User - missing permissions

Hi,
I’m not finding any documentation on how to set up the new feature Discord: “Add Role to User Action”.
It would be nice to have a step-by-step guide on how to use the new feature or even how to connect properly.
I did the following as directed below to the action “Request Approval to a Channel” or now the new “Add Role to User”, but still doesn’t connect:

That’s the direction given…
To obtain a token, follow these steps:

  1. Go to Discord Developer Portal
  2. Click on Application (or create one if you don’t have one)
  3. Click on Bot
  4. Copy the token

I did that and I had to figure out the rest by myself. Activepieces instructions are not saying what kind of permission I need to give to the BOT or the actions I have to follow to that.

In the Discord Developer Portal, when I give the BOT the permissions I believe it needs to add Role to user, it generates a PERMISSION_INTEGER number, which I add to an URL to “invite” the BOT to my channel, Example:
https://discord.com/api/oauth2/authorize?client_id=YOUR_BOT_CLIENT_ID&permissions=PERMISSION_INTEGER&scope=bot

But after I add the BOT to the Channel and Run the flow it shows the error of Missing Permissions below:

{
  "response": {
    "status": 403,
    "body": {
      "message": "Missing Permissions",
      "code": 50013
    }
  },
  "request": {}
}

Please help or give more instructions.

Thanks in advance.

The token should be under “Bot” instead of “OAuth2.” This should provide the token instantly without a URL.

Is this the token you used?

When you invite the bot, can you try giving it admin permission first, and let me know if that works?

I will update the instructions soon. I need to do some testing first.

Hi, Thank you for your response.
Yes I added it under the Bot section but it needs to be invited to enter a specific channel, does it not?

I gave Admin permission and it still gives me the message on the Action:

{
  "response": {
    "status": 403,
    "body": {
      "message": "Missing Permissions",
      "code": 50013
    }
  },
  "request": {}
}

Besides the Permissions, also it would be good to know the other Authorization Flow features to choose which ones to leave ON/OFF.

Authorization Flow

These settings control how OAuth2 authorizations are restricted for your bot (who can add your bot and how it is added).

PUBLIC BOT

Public bots can be added by anyone. When unchecked, only you can join this bot to servers. ON/OFF?

REQUIRES OAUTH2 CODE GRANT

If your application requires multiple scopes then you may need the full OAuth2 flow to ensure a bot doesn’t join before your application is granted a token. ON/OFF?

Privileged Gateway Intents

Some Gateway Intents require approval if your bot is verified. If your bot is not verified, you can toggle those intents below to access them.

PRESENCE INTENT

Required for your bot to receive Presence Update events. ON/OFF?

NOTE: Once your bot reaches 100 or more servers, this will require verification and approval. Read more here

SERVER MEMBERS INTENT

Required for your bot to receive events listed under [GUILD_MEMBERS] ON/OFF?
(Discord Developer Portal).

NOTE: Once your bot reaches 100 or more servers, this will require verification and approval. Read more here

MESSAGE CONTENT INTENT

Required for your bot to receive message content in most messages. ON/OFF?

NOTE: Once your bot reaches 100 or more servers, this will require verification and approval. Read more here

Thanks
D

Hi,
I managed to make the bot work on the “Add User Role” by putting the BOT on top of everyone in the Roles sections of the Server Settings (a friend gave me this tip), but for that to work, I had to know the User ID and add to the Sheets myself, which I can’t to automatically (that’s the whole point of this automation). I tried to List Guild Members to maybe get the ID from the user registration email, but it didn’t work. Can you help me with this error to list Guild members?

Thanks
D

Hi,
How can I get support for this?
Thanks in advance.
D

Hi,
How can I get support for this?
Thanks in advance.
D

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.