Exchanges credentials for a short-lived Bearer access token and a single-use refresh token. See the "OAuth Tokens" guide for the full integration walkthrough, lifecycle diagram, and the serialisation guidelines that keep partners from tripping the refresh-reuse detector.
Two grant types are supported:
client_credentials— bootstrap exchange: trade your long-lived API key (sent asclient_secret) for the first token pair.refresh_token— rotate: exchange a current refresh token for a new pair. The old refresh token is marked single-use and may not be presented again.
This endpoint does NOT require an existing Bearer or X-Authorization header — the request body carries its own credentials.
The long-lived API key — required when grant_type=client_credentials.
Optional and ignored. Accepted for compatibility with OAuth client libraries that always send it.
- Mock serverhttps://docs.bemyguest.com.sg/_mock/openapi/v2/oauth/token
- Api Demo Serverhttps://api.demo.bemyguest.com.sg/v2/oauth/token
- Api Production Serverhttps://api.bemyguest.com.sg/v2/oauth/token
curl -i -X POST \
https://docs.bemyguest.com.sg/_mock/openapi/v2/oauth/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode grant_type=client_credentials \
--data-urlencode client_secret=a1b2c3d4e5... \
--data-urlencode client_id=string \
--data-urlencode refresh_token=bmg_rt_...A fresh access + refresh token pair.
Short-lived bearer token. Send as Authorization: Bearer <token> on subsequent API requests.
Single-use refresh token. Exchange via grant_type=refresh_token before the access token expires.
{ "token_type": "Bearer", "access_token": "bmg_at_f1e2d3c4...", "refresh_token": "bmg_rt_a1b2c3d4...", "expires_in": 900 }