Basic
The easiest administrative access
Authorization: "Basic
base64("{appKey}:{secret}")"
Basic authentication sends user credentials with each HTTP request as a Base64-encoded value. Because Base64 provides encoding rather than encryption, this method offers limited security and is best suited for trusted environments.
When using Optimizely Graph, you can supply your Hash-based Message Authentication Code (HMAC) appKey as the username and secret as the password. HTTP clients such as Postman can generate the required authorization header automatically. If your client does not support Basic authentication, encode the ${appKey}:${secret} value using Base64 and include it in the request.
cURL Example
curl -X POST "https://cg.optimizely.com/content/v2" \
-H "Authorization: Basic BASE64_ENCODED_CREDENTIALS" \
-H "Content-Type: application/json" \
-d '{"query": "{ BlogPost { total } }"}'
NoteUse
echo -n "username:password"| base64 to encode your credentials.
Updated 4 days ago
