> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiderx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# API Access and Authentication

> Confirm your A2 API address and issue an access token for management APIs.

Call A2 APIs at the API address you received. An access token is required only for management APIs.

| Type | Examples | Access token |
| - | - | - |
| Ad requests and event delivery | Ad requests, ad events, user events | Not required. |
| Management APIs | Catalog, experiments, metrics | Required. |

## API address

Replace `<A2_API_URL>` in the examples with your supplied A2 API base URL. Include the scheme (`https://` or `http://`), host, and port if required. Sign in to Ad Manager with the console address and account supplied separately.

## Issue an access token

Issue the token in Ad Manager with an administrator account.

**1. Open developer settings**

Sign in to Ad Manager with an administrator account, then go to **Management > Settings** and find **Developer Settings**.

**2. Issue or copy the token**

If **Access Token** is empty, select the refresh icon to issue one. If a token already exists, select the copy icon.

> [!WARNING]
>
> The access token uses the issuing administrator account's permissions. Store it in a server-side secret store or a restricted environment variable, and do not include it in web pages, apps, public repositories, or logs.

A2 keeps one token per environment. Regenerating it with the refresh icon immediately invalidates the previous token, so update every server that uses it.

## Verify authentication

Put the token in the `Authorization: Bearer <token>` header when calling management APIs. Verify it with the [Get Me API](</en/0.5.0/data management/auth/get-me>).

```bash theme={null}
curl -i "<A2_API_URL>/api/users/me" \
  -H "Authorization: Bearer <token>"
```

HTTP `200` with the issuing account's information means you are authenticated. For `401`, check the token and header. For `403`, check the account's permissions.

## Next step

Create a sample banner and request an ad in the [Ad Serving Quickstart](https://docs.aiderx.io/development/en/quick-start.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.