Generate Token
Exchange the authorization code for an access token and refresh token. This endpoint is used after receiving the authorization code from the authorize endpoint.
The authorization code received from the authorize endpoint
Your OAuth client secret (keep this secure!)
Must be set to authorization_code for this flow
The same redirect URI used in the authorization request
curl --location 'https://app.aisync.link/oauth/token' \
--form 'code="{{code}}"' \
--form 'client_id="{{client_id}}"' \
--form 'client_secret="{{client_secret}}"' \
--form 'grant_type="authorization_code"' \
--form 'redirect_uri="{{redirect_uri}}"'
The access token to use for API requests. Include this in the Authorization header as Bearer {access_token}.
Token used to obtain a new access token when it expires. Store this securely.
The type of token, typically Bearer
The number of seconds until the access token expires
Store your refresh token securely. You’ll need it to get new access tokens without requiring user re-authorization.
Body
application/x-www-form-urlencoded
The authorization code received from the authorize endpoint
grant_type
enum<string>
default:authorization_code
required
Must be set to 'authorization_code' for this flow
Available options:
authorization_code
The same redirect URI used in the authorization request
The access token to use for API requests
token_type
string
default:Bearer
required
The type of token, typically 'Bearer'
The number of seconds until the access token expires
Token used to obtain a new access token when it expires