Check your API key
curl --request GET \
--url https://api.teambuilder.ge/v1/ping \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.teambuilder.ge/v1/ping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.teambuilder.ge/v1/ping"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"company_id": "5f0c2e1a-8b3d-4c7e-9a21-6d4b8e3f1c09",
"key_prefix": "tb_live_",
"scopes": [
"employees:read",
"leaderboard:read",
"departments:read",
"shop:read"
],
"mode": "live"
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after 30 seconds.",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}Check your API key
Check that a key works and see the company, scopes and mode it carries. Works with any valid key.
GET
/
v1
/
ping
Check your API key
curl --request GET \
--url https://api.teambuilder.ge/v1/ping \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.teambuilder.ge/v1/ping', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.teambuilder.ge/v1/ping"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"company_id": "5f0c2e1a-8b3d-4c7e-9a21-6d4b8e3f1c09",
"key_prefix": "tb_live_",
"scopes": [
"employees:read",
"leaderboard:read",
"departments:read",
"shop:read"
],
"mode": "live"
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Too many requests. Retry after 30 seconds.",
"request_id": "req_7Hq2LmX9vT4kPz1RbN8sWc"
}
}Call this from each service after deploying or rotating a key, and assert the
mode you expect.Authorizations
API key — tb_live_… for production data, tb_test_… for the sandbox.
Response
The key is valid.
Your company in TeamBuilder. For a test key, your sandbox company.
Example:
"5f0c2e1a-8b3d-4c7e-9a21-6d4b8e3f1c09"
How the key starts: tb_live_ for a live key, tb_test_ for a test key.
Available options:
tb_live_, tb_test_ Example:
"tb_live_"
What the key may access:
employees:read: employees, their stats and badges.leaderboard:read: the leaderboards.departments:read: departments.shop:read: shop items.employees:write: the roster sync.
What the key may access:
employees:read: employees, their stats and badges.leaderboard:read: the leaderboards.departments:read: departments.shop:read: shop items.employees:write: the roster sync.
Available options:
employees:read, leaderboard:read, departments:read, shop:read, employees:write Example:
[
"employees:read",
"leaderboard:read",
"departments:read",
"shop:read"
]
live reads and writes your real data; test reads and writes your sandbox company.
Available options:
live, test Example:
"live"
