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

# Get API Access Token

> This endpoint allows you to retrieve an API access token using your `client_id` and `client_secret`.

To authenticate:

- Click `Try it ▶`
- Enter your **client_id** as the `Authorization.username`
- Enter your **client_secret** as the `Authorization.password`

The request must include the following body parameter:

- `grant_type`: This is always set to `client_credentials`

Hit `Send ▶` and the response will contain an `access_token`, which you can use as a Bearer token to authenticate requests to other endpoints.

```json
{
  "access_token": "ACCESS_TOKEN",
  "expires_in": 3600,
  "token_type": "Bearer",
  "scope": "read write"
}
```



## OpenAPI

````yaml post /o/token/
openapi: 3.0.3
info:
  title: OAuth Token API
  version: 1.0.0
  description: Token endpoint using client credentials flow.
servers:
  - url: https://api.standardmetrics.io
security: []
paths:
  /o/token/:
    post:
      summary: Get API Access Token
      description: >-
        This endpoint allows you to retrieve an API access token using your
        `client_id` and `client_secret`.


        To authenticate:


        - Click `Try it ▶`

        - Enter your **client_id** as the `Authorization.username`

        - Enter your **client_secret** as the `Authorization.password`


        The request must include the following body parameter:


        - `grant_type`: This is always set to `client_credentials`


        Hit `Send ▶` and the response will contain an `access_token`, which you
        can use as a Bearer token to authenticate requests to other endpoints.


        ```json

        {
          "access_token": "ACCESS_TOKEN",
          "expires_in": 3600,
          "token_type": "Bearer",
          "scope": "read write"
        }

        ```
      parameters: []
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                    - client_credentials
                  default: client_credentials
                  description: Always set to 'client_credentials'
              required:
                - grant_type
      responses:
        '200':
          description: Access token retrieved successfully
          content:
            application/json:
              example:
                access_token: ACCESS_TOKEN
                expires_in: 3600
                token_type: Bearer
                scope: all read write
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  expires_in:
                    type: integer
                  token_type:
                    type: string
                  scope:
                    type: string
                required:
                  - access_token
                  - expires_in
                  - token_type
      security:
        - basicAuth: []
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````