Authorization code

After you obtain an authorization code, you can exchange this authorization code for an access token by issuing an HTTPS POST request to Optimizely's authorization server.

The examples below show an example request and a successful response. The response will include an access token (with a lifetime of two hours) as well as a refresh token that can be used to request more access tokens after the initial access token expires.


Example POST request


Example JSON response

  "access_token": "abcdefghijklmnopqrstuvwxyz",
  "expires_in": 7200,
  "token_type": "bearer",
  "refresh_token": "1234567890abcdefghijklmnopqrstuvwxyz"