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

# Request access token

> Request an OAuth access token (and, depending on the grant type, a refresh token).

Supported grant types:
- **`client_credentials`** — pass your `client_id` and `client_secret` to receive a new access token and refresh token.
- **`refresh_token`** — pass your `client_id` and the existing `refresh_token` to get a new pair of tokens.
- **`authorization_code`** — pass the `authCode` to get an access token for a specific user. Use this when building your own client.



## OpenAPI

````yaml openapi/authentication.json POST /oauth/token
openapi: 3.0.3
info:
  title: Authentication
  description: Authentication
  version: 1.0.0
servers:
  - url: https://stage-api.findity.com/api
  - url: https://api.findity.com/api
security:
  - bearerAuth: []
paths:
  /oauth/token:
    post:
      tags:
        - Token
      summary: Request access token
      description: >-
        Request an OAuth access token (and, depending on the grant type, a
        refresh token).


        Supported grant types:

        - **`client_credentials`** — pass your `client_id` and `client_secret`
        to receive a new access token and refresh token.

        - **`refresh_token`** — pass your `client_id` and the existing
        `refresh_token` to get a new pair of tokens.

        - **`authorization_code`** — pass the `authCode` to get an access token
        for a specific user. Use this when building your own client.
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/oauth-token-request'
            example:
              grant_type: client_credentials
              client_id: 9fe5e8409bd511ed851263dc7e596f1e
              client_secret: 972ace009bd511edb416cb73503f108b
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/oauth-token-response'
              example:
                access_token: >-
                  MWnNTCwqspGJwmATOqZ9T1GhseXc93i0D6AFbEjFut7Kyz5GhEElXpByzwIE0kk92QKWGCscbLgrXfTr4RkJB64WivXBKkZBk
                token_type: Bearer
                expires_in: 36000
                refresh_token: >-
                  GLjW5pkF9tudhdn1AwpPpbe5dS7i6Uoe5HoL0IluEatyQ+y02zbTMsx8FCqwUH0Q8PLhF65Xj643taiIQ9gG7dNgS0ehSqfYBh
      security: []
components:
  schemas:
    oauth-token-request:
      type: object
      properties:
        grant_type:
          type: string
          enum:
            - client_credentials
            - refresh_token
            - authorization_code
          description: >-
            The OAuth 2.0 grant type. Use `client_credentials` to authenticate
            with a client ID and secret, `refresh_token` to exchange a refresh
            token for a new token pair, or `authorization_code` to exchange an
            authorization code for tokens.
        client_id:
          type: string
          description: The client application identifier.
        client_secret:
          type: string
          description: The client application secret.
        refresh_token:
          type: string
          description: Use together with grant_type refresh_token.
        code:
          type: string
          description: Use together with grant_type authorization_code.
      example:
        grant_type: client_credentials
        client_id: 9fe5e8409bd511ed851263dc7e596f1e
        client_secret: 972ace009bd511edb416cb73503f108b
    oauth-token-response:
      type: object
      properties:
        access_token:
          type: string
          description: >-
            The issued Bearer access token. Include this in the `Authorization:
            Bearer <token>` header for subsequent API requests.
        token_type:
          type: string
          description: The type of the issued token. Always `Bearer`.
        expires_in:
          type: integer
          description: Lifetime of the access token in seconds.
        refresh_token:
          type: string
          description: >-
            A refresh token that can be used to obtain a new access token using
            the `refresh_token` grant type. Each refresh token can only be used
            once.
      example:
        access_token: >-
          MWnNTCwqspGJwmATOqZ9T1GhseXc93i0D6AFbEjFut7Kyz5GhEElXpByzwIE0kk92QKWGCscbLgrXfTr4RkJB64WivXBKkZBk
        token_type: Bearer
        expires_in: 36000
        refresh_token: >-
          GLjW5pkF9tudhdn1AwpPpbe5dS7i6Uoe5HoL0IluEatyQ+y02zbTMsx8FCqwUH0Q8PLhF65Xj643taiIQ9gG7dNgS0ehSqfYBh
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````