Open this on a computer

The Sample Bot API site is made for a computer, where you write code. Visit api.samplebot.app on your computer.

Back to samplebot.app

Sample Bot API

Bot API

Members

3 endpoints. Every address starts with https://api.samplebot.app/v1/servers/{server id}.

GET/members/:userId members:read

A member: name, roles, when they joined, their Roblox account.

NameInDescription
userId requiredpath
curl "https://api.samplebot.app/v1/servers/{server id}/members/{userId}" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

Example data:

{
  "id": "1246251869798400001",
  "username": "roman",
  "displayName": "Roman",
  "joinedAt": "2025-03-01T12:00:00.000Z",
  "roles": [
    {
      "id": "1345183757107200001",
      "name": "Staff"
    }
  ],
  "roblox": {
    "id": "1234567",
    "name": "Roman_RP"
  }
}

GET/members/by-roblox/:robloxId members:read

Which member of this server owns a Roblox account. Only members of this server are found.

NameInDescription
robloxId requiredpath
curl "https://api.samplebot.app/v1/servers/{server id}/members/by-roblox/{robloxId}" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"

GET/members/by-roblox-name/:name members:read

The same, by Roblox username.

NameInDescription
name requiredpath
curl "https://api.samplebot.app/v1/servers/{server id}/members/by-roblox-name/{name}" \
  -H "Authorization: Bearer $SAMPLE_API_KEY"