Naar de hoofdinhoud
API for Developers: Access Tokens
Feedback Company avatar
Geschreven door Feedback Company
Meer dan een week geleden bijgewerkt

Create


Creates a new access token for the given "client_id" and "client_secret", and invalidates any previously granted access token. Access tokens are valid for a maximum of 60 days, but may expire earlier for other reasons.

Any other API method that requires authentication checks if the "Authorization" HTTP Header is included in the request with the value "Bearer <access_token>", where "<access_token>" should be replaced with the value of an actual access token that's returned from this API method. It's recommended to develop your API client to automatically get a new access token every 60 days and store it locally.

Any other API method that requires authentication might unexpectedly respond with an authorization error with status code 401. It's recommended to develop your API client to get a new access token whenever a response has status code 401, and retry the attempted API method call once with the new access token. If successful your API client should store the new access token and reset the 60 day refresh period.

Request

URL

Parameters

Name

Allowed values

Required

client_id

(A valid client id, string)

Yes

client_secret

(A valid client secret, string)

Yes

grant_type

"authorization_code"

Yes

Response

Headers

Name

Value

Status code

200

Status message

OK

Example

{
error: false,
access_token: "1234567890123456789012345678901234567890123456789012345678901234",
expires_on: "April, 1 2018 00:00:00 +0100"
}
Was dit een antwoord op uw vraag?