OAuth 2.0 Classic Token
This topic describes how to authenticate with the v1 API using an API token.
Note
The tokens described below only work for the v1 API. Use Personal Tokens for the v2 API authentication.
Visit app.optimizely.com/tokens to generate an API token.
To authenticate, use a token generated from the link above in the request header, as shown in the example below. All API request examples in this documentation use the same header.
curl \
-H "Token: abcdefghijklmnopqrstuvwxyz:123456" \
"https://www.optimizelyapis.com/experiment/v1/projects/"
You can also write applications that authenticate with the REST API via OAuth 2.0. For more details on connecting applications via OAuth 2.0, refer to our OAuth 2.0 documentation.
Using the wrong token, or including the token in the request body rather than the header, will fail with the error Authentication Failed.
Updated over 1 year ago