greg6775/Discord-Api-Endpoints

Get the Bot name

Closed this issue · 2 comments

Hi all.
I need to find to detect the BOT name using the bot token.

is this API endpint can do?

Yes,

You can use the /users/@me endpoint to find out the name. Just add the Bot Token as Authorization Header.

The response will look somewhat like this

{
    "id": "715897534874386473",
    "username": "TeSt",
    "avatar": "8d59064a5e27754d0d03096eb705d8a7",
    "discriminator": "7275",
    "public_flags": 0,
    "flags": 0,
    "bot": true,
    "banner": null,
    "banner_color": null,
    "accent_color": null,
    "bio": "",
    "locale": "en-US",
    "mfa_enabled": true,
    "email": null,
    "verified": true
}

Is it documented somewhere besides this repository? =D

Oh, it is! https://discord.com/developers/docs/resources/user#get-current-user