Skip to content

Guild Configuration

Retrieve Configuration

GET/v1/config?id=GUILD_ID

Example Requests

curl -X GET -H "Authorization: ApiKey YOUR_API_KEY" "https://x.teamtbm.org/api/v1/config?id=GUILD_ID"
<?php
$ch = curl_init("https://x.teamtbm.org/api/v1/config?id=GUILD_ID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: ApiKey YOUR_API_KEY"
]);
$response = curl_exec($ch);
$data = json_decode($response);

var_dump($data->config);
?>
const resp = await fetch('https://x.teamtbm.org/api/v1/config?id=GUILD_ID', {
  headers: {
    "Authorization": "ApiKey YOUR_API_KEY"
  }
});
const data = await resp.json();

console.log(data.config);

Responses

{
  "success": true,
  "code": 200,
  "config": [
    {
      "name": String,
      "enabled": Boolean,
      "channelId": String
    },
    ...
  ]
}

No API Key was provided.

{
  "success": false,
  "code": 401,
  "message": "Unauthorised"
}

The API Key provided was invalid or did not match the Guild ID.

{
  "success": false,
  "code": 403,
  "message": "Access Denied"
}

A request method other than HTTP GET was used.

{
  "success": false,
  "code": 405,
  "message": "Method Not Allowed"
}

The client exceeded the maximum number of attempts within the given time period.

{
  "success": false,
  "code": 429,
  "message": "Too Many Requests"
}

An internal error has occurred preventing a successful request. See message field for more information.

{
  "success": false,
  "code": 500,
  "message": "Internal Server Error: <Error Description>"
}