Exchange Client Credentials/ Refresh Access Token

This endpoint exchanges your client assertion generated earlier for an api token used to access the endpoints. Also call this endpoint to refresh your api token when it expires

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The expires_in value is the token lifetime in seconds. Use the returned access_token as Authorization: Bearer <access_token> and the returned ibs_client_id as the ClientID header on every other request.

Client assertion rules: signed with RS256; sub must be your OAuth Client ID; aud must be the API base URL of the environment you are calling; iat and exp (epoch seconds) are required, iat must not be in the future and exp must not be in the past.

Lifetimes: access tokens last 40 minutes; refresh tokens last 90 days. Request a new token (or use refresh_token) before the access token expires.

IP allowlist: if your OAuth app has an IP allowlist, requests from other IPs are rejected with HTTP 403 Access Restricted: IP not allowed!.

Body Params
string
enum
required
Defaults to client_credentials

This is the type of your app. Use 'client_credentials' for private apps and 'authorization_code' for public apps.

Allowed:
string
required

This is your OAuth Client ID which can be gotten from your app page on the Safe Haven dashboard.

string
required

This is the client assertion you generated earlier.

string
required
Defaults to urn:ietf:params:oauth:client-assertion-type:jwt-bearer

This is the client assertion type.

string

Pass your refresh token when you want to generate a new api token.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json