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

# Exchange Access Token

> Only for TenantUsers - Exchanges the current user access token, for an org-bound or tenant-bound token. The user must have access to the target org / tenant. The new access token expiration won't exceed the current token's one.

#### Authentication

✅ Tenant User (`TenantUser`)\
❌ Organization User (`CustomerEmployee`)\
❌ End User (`EndUser`)\
❌ Personal Access Token not allowed\
❌ Service Account

#### Required Permissions

No permission required.


## OpenAPI

````yaml /openapi.yaml post /auth/tokens
openapi: 3.1.0
info:
  version: 2.0.325
  title: Dfns
servers:
  - url: https://api.dfns.io
    description: Default - Europe
  - url: https://api.uae.dfns.io
    description: UAE
  - url: https://api.dfns.ninja
    description: <Deprecated> Staging
security: []
paths:
  /auth/tokens:
    post:
      tags:
        - Auth
      summary: Exchange Access Token
      description: >-
        Only for TenantUsers - Exchanges the current user access token, for an
        org-bound or tenant-bound token. The user must have access to the target
        org / tenant. The new access token expiration won't exceed the current
        token's one.
      operationId: exchangeAccessToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target:
                  type: string
                  description: >-
                    ID of the Organisation or Tenant for which you wish to
                    obtain an access token.
              required:
                - target
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                required:
                  - token
      security:
        - authenticationToken: []
components:
  securitySchemes:
    authenticationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        **Bearer Token:** Used to authenticate API requests.

        More details how to generate the token: [Authentication
        flows](https://docs.dfns.co/api-reference/auth/login-flows)

````

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