API Reference › OAuth
Refresh Access Token
POST
/oauth/tokenGet a new access token with a refresh token. Tokens rotate: the old access and refresh tokens stop working, so store the new pair.
Authorization and token management. These follow the OAuth 2.0 spec and answer in plain OAuth JSON (no success/data envelope). Errors use the standard error and error_description fields.
Usage
curl -X POST "https://api.lifebots.cloud/api/v1/oauth/token" \
--data-urlencode "grant_type=refresh_token" \
--data-urlencode "client_id=your_client_id" \
--data-urlencode "client_secret=your_client_secret" \
--data-urlencode "refresh_token=lb_rt_…"Path parameters
None.
Body (application/x-www-form-urlencoded)
| Name | Type | Required | Description |
|---|---|---|---|
grant_type | string | yes | refresh_token |
client_id | string | yes | Your client_id. |
client_secret | string | no | Required for confidential apps. |
refresh_token | string | yes | The current refresh token. |
Example response
{
"access_token": "lb_at_…",
"refresh_token": "lb_rt_…",
"token_type": "Bearer",
"scope": "read:profile bots:chat",
"expires_in": 3600
}