Role Members

Allows you to retrieve all the user IDs that have a specific role within your Discord server.

Information

  • URL: https://api.erensko.xyz/v1/role-members

  • Method: GET

  • Description: Returns all users in your Discord server who have a specific role.

URL Parameters

Key
Value

role-id

The ID of the role you would like to get members of.

server-id

The ID of the server where the role exists.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here.

bot-token

The token of your Discord bot, must be inside the server you're requesting.

We require your Discord bot token to authenticate and send requests to Discord on your behalf, and your token is never shared, ensuring your privacy and safety.

Request Example

GET https://api.erensko.xyz/v1/role-members?role-id=ROLE-ID&server-id=SERVER-ID
bot-token=YOUR BOT TOKEN

Response Example

{
    "success": true,
    "userIds": [
        "407342486713794562",
        "409650437457707028",
        "1046442637336510524"
    ],
    "usernames": [
        "erennsko",
        "ba_azs",
        "snniizz"
    ],
    "userDisplays": [
        "Erensko",
        "Balazs",
        "Snizz"
    ],
    "userCount": 3,
    "roleId": "1296463172873617408",
    "serverId": "1296236092697083944"
}

Last updated