---
title: Basic
slug: graph/docs/basic
docTags: 
createdAt: 2026-07-30T20:30:17.955Z
---

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 where the request travels over HTTPS.

Include the encoded credentials in the `Authorization` header using the following format:

```http
Authorization: Basic base64(APP_KEY:SECRET)
```

Supply your Hash-based Message Authentication Code (HMAC) `APP_KEY` as the username and `SECRET` as the password. HTTP clients such as Postman generate the required authorization header automatically. When your client does not support Basic authentication, encode the `APP_KEY:SECRET` value using Base64 and include it in the request.

## cURL example

Use this `curl` command to send a GraphQL query authenticated with Basic credentials.

```bash
curl -X POST "https://cg.optimizely.com/content/v2" \
-H "Authorization: Basic BASE64_ENCODED_CREDENTIALS" \
-H "Content-Type: application/json" \
-d '{"query": "{ BlogPost { total } }"}'
```

:::hint{type="info"}
**Note**
Use `echo -n "username:password" | base64` to encode your credentials.
:::
