Refresh token
Overview
Exchanges a refresh token for a new access token and a new refresh token. Call it once the access token expires — access tokens last 1 day, refresh tokens last 30 days.
The old refresh token is consumed the moment this succeeds, so persist the new pair immediately. Reusing a spent refresh token returns 400 invalid_grant.
Prerequisites
- No bearer token. This endpoint authenticates with your OAuth client credentials, sent in the request body.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /oauth/token
Authentication
- No bearer token. Authenticate with your OAuth client credentials in the request body.
Send no Authorization header. The request authenticates with your client_id and client_secret plus the refresh token itself.
Rate limit
- Shares the
POST /oauth/tokenroute, which carries the framework's defaultthrottle(60 requests/min per client).
Request body
Send the body as application/x-www-form-urlencoded.
Send as application/x-www-form-urlencoded.
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | string | Required | Must be refresh_token. |
refresh_token | string | Required | The refresh token from your last token response. |
client_id | string | Required | OAuth client identifier. |
client_secret | string | Required | OAuth client secret. |
scope | string | Optional | * requests full access. |
How it works
- 200 returns a new
access_token,refresh_token,token_typeandexpires_in. - 400
invalid_grantwhen the refresh token is expired, already used, or does not match the client. - 401
invalid_clientwhen the client credentials are wrong. - Once the refresh token passes its 30-day life, the user must sign in again with the password grant.
Response
200 Success · 200
200{
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "<new-access-token>",
"refresh_token": "<new-refresh-token>"
}400 Invalid refresh token · 400
400{
"error": "invalid_grant",
"error_description": "The refresh token is invalid."
}Errors
| Status | Meaning |
|---|---|
400 | Invalid/expired/reused refresh token (invalid_grant) |
401 | Wrong client credentials (invalid_client) |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/oauth/token" \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token={{refreshToken}}' \
--data-urlencode 'client_id={{oauthClientId}}' \
--data-urlencode 'client_secret={{oauthClientSecret}}' \
--data-urlencode 'scope=*'Updated 18 days ago
Did this page help you?
