Back to APIs
Discord API
The Discord REST API lets you build bots and integrations — read messages, manage guild members, create channels, assign roles, and react to events.
Base URL
https://discord.com/api/v10botsguildschannelsmessagesOAuth 2.0
Endpoints
GET
/guilds/{guild.id}/membersList members of a Discord server.
const response = await fetch("https://discord.com/api/v10/guilds/GUILD_ID/members?limit=100", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});
const data = await response.json();
console.log(data);Response Preview
[{
"user": {
"id": "80351110224678912",
"username": "Nelly",
"discriminator": "1337",
"avatar": "8342729096ea3675442027381ff50dfe"
},
"roles": ["431930842472013825"],
"joined_at": "2015-04-26T06:26:56.936000+00:00"
}]