Skip to main content
POST
/
oauth
/
token
/
refresh
Refresh Token
curl --request POST \
  --url https://app.aisync.link/oauth/token/refresh \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data 'client_id=<string>' \
  --data 'client_secret=<string>' \
  --data grant_type=refresh_token \
  --data 'redirect_uri=<string>' \
  --data 'refresh_token=<string>'
{
  "access_token": "<string>",
  "refresh_token": "<string>",
  "token_type": "Bearer",
  "expires_in": 123
}

Refresh Token

Obtain a new access token using your refresh token. Use this endpoint when your access token expires to continue making API calls without requiring user re-authorization.
client_id
string
required
Your OAuth client ID
client_secret
string
required
Your OAuth client secret
grant_type
string
required
Must be set to refresh_token for this flow
redirect_uri
string
required
The redirect URI registered with your OAuth client
refresh_token
string
required
The refresh token obtained from the Generate Token endpoint
curl --location 'https://app.aisync.link/oauth/token/refresh' \
  --form 'client_id="{{client_id}}"' \
  --form 'client_secret="{{client_secret}}"' \
  --form 'grant_type="refresh_token"' \
  --form 'redirect_uri="{{redirect_uri}}"' \
  --form 'refresh_token="{{refresh_token}}"'
access_token
string
A new access token to use for API requests
refresh_token
string
A new refresh token (may be the same or different from the one provided)
token_type
string
The type of token, typically Bearer
expires_in
integer
The number of seconds until the new access token expires
Refresh your access token before it expires to ensure uninterrupted API access. Most applications refresh tokens proactively when they’re close to expiration.

Body

application/x-www-form-urlencoded
client_id
string
required

Your OAuth client ID

client_secret
string<password>
required

Your OAuth client secret

grant_type
enum<string>
default:refresh_token
required

Must be set to 'refresh_token' for this flow

Available options:
refresh_token
redirect_uri
string<uri>
required

The redirect URI registered with your OAuth client

refresh_token
string
required

The refresh token obtained from the Generate Token endpoint

Response

Token response

access_token
string
required

The access token to use for API requests

token_type
string
default:Bearer
required

The type of token, typically 'Bearer'

expires_in
integer
required

The number of seconds until the access token expires

refresh_token
string

Token used to obtain a new access token when it expires