Bifrost Bifrost

Authentication

All requests to the Bifrost API must be authenticated using OAuth 2.0 client credentials. Access tokens expire after 1 hour (3600 seconds), so your integration must detect expired tokens and re-authenticate to obtain a new access token.

Important: Access tokens expire after 1 hour (3600 seconds). Your integration must detect token expiration and automatically re-authenticate to obtain a new token.

Rate Limiting

All API requests are subject to rate limits. Exceeding a limit returns an HTTP 429 response with a RATE_LIMITED error code and a retryAfter value in seconds.

Scope Limit
Overall request budget 1,000 requests per hour per server (by game type)
OAuth token request 1 per 30 minutes per guild
testQuery 1 per 60 seconds per guild

Cache your tokens. Access tokens are valid for 1 hour — request a new token only when the current one expires. Requesting a fresh token on every API call will hit the OAuth rate limit.

Each endpoint has its own per-query rate limit. See the full rate limiting documentation for all per-endpoint limits, handling 429 responses, and code examples.

Step 1: Get Access Token

Use your client credentials to obtain an access token from the OAuth endpoint:

curl -X POST https://api.dev.bifrostgaming.com/v1/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Token Response

The OAuth endpoint returns:

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600
}
Field Description
access_token JWT token used to authenticate API requests
token_type Always "Bearer"
expires_in Token lifetime in seconds (always 3600 = 1 hour)

Step 2: Use the Access Token

Include the access token in the Authorization header for all API requests:

curl -X POST https://api.dev.bifrostgaming.com/v1/graphql \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ testQuery { success message randomWord timestamp guildId } }"}'

In partnership with

Brilliant game servers for communities large and small.

Get yours today!

Shrapnelworks Logo

A Shrapnelworks product