---
title: "Add an API key or access token to a request header"
slug: "add-an-api-key-or-access-token-to-a-request-header"
abstract: "Learn how to access Discover APIs by adding an API key or access token in the request header."
---
# Add an API key or access token to a request header

If you do not have a subdomain, you must include an API key or an access token in every request header.

## Add an API key to a request header

To pass the API key in the header when you make a GET request to the Discover search and recommendation API:

- Use the following code sample.

```Shell
curl -X GET \

  'https://api.rfksrv.com/search-rec/<ckey>/3?data={"content":{}}' \

  -H 'Authorization: <api-key>'
```

## Add an access token to a request header

To pass the access token in the header when you make a GET request to the Discover search and recommendation API:

- Use the following code sample.

```Shell
curl -X GET \

  'https://api.rfksrv.com/search-rec/<ckey>/3?data={"content":{}}' \

  -H 'Authorization: Bearer <access-token>'
```