---
url: https://docs.seen.io/api/authorization.md
description: >-
  Explains how to authenticate Seen API requests with a Bearer token, using
  either an API key or an OAuth2 access token.
---

# Authorization

This API supports **Bearer token authentication**, using either an **API Token** or an **OAuth2 access token**.

To access protected endpoints, you need to include your unique token in the `Authorization` header of your HTTP requests:

```
"Authorization": "Bearer <your API token value | YourOAuth2TokenValue>"
```

## API Tokens

You can create API tokens in your Seen Platform Workspace by navigating to:

**Settings → API → Create API Key**

Alternatively, you can create an API token directly in the [Run page](../platform/projects/run) of your project.

## OAuth2 Clients

You can create OAuth2 clients by navigating to:

**Settings → API → Create OAuth2 Client**

::: warning
Toggling **ADMIN** on gives the token `READ` and `WRITE` access.

If **ADMIN** is left un-toggled, the token will have `READ` access only.
:::

### Obtaining an OAuth2 Access Token

After creating your OAuth2 Client, you can obtain an access token with the following schema:

### Endpoint

`https://next.seen.io/oauth2/token`

### Request Method

`POST`

### Request Header

`Content-Type: application/x-www-form-urlencoded`

### Request Body

| Key | Value | Comment |
|---|---|---|
| `grant_type` | `client_credentials` | **Required** |
| `client_id` | `<client_id>` | **Required** |
| `client_secret` | `<client_secret>` | **Required** |
| `scope` | requested scopes | Space separated |
