Get access token
Every API call needs an access token. You get it with three values:
| Value | Where to find it |
|---|---|
| tenantId | The ID of your Microsoft 365 tenant. It also appears in the Admin Center address: https://manage.seamlesswork.com/{tenantId}/... |
| keyId | The Id of your key under Settings > API keys |
| secret | The secret you stored when you created the key |
No key yet? See API keys.
Request
POST https://sml-api.io/token
Content-Type: application/json
{
"tenantId": "00000000-0000-0000-0000-000000000000",
"keyId": "e37e2481-7892-4808-8b07-f0a81bb50c11",
"secret": "your-secret"
}Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"accessToken": "eyJ0eXAiOiJKV1Qi...",
"tenantId": "00000000-0000-0000-0000-000000000000",
"expiresAt": "2026-10-22T10:27:27.7458568Z"
}Send accessToken in the header with every further call:
Authorization: Bearer eyJ0eXAiOiJKV1Qi...For security reasons, the token is valid for 24 hours, until expiresAt. Store it securely and keep using it until then, or get a new one for every call.