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

# Token Endpoint

> Token Endpoint provides tokens according to **OAuth 2.0/OIDC 1.0** (RFC-6749) specifications and its extension **OAuth 2.0 Token Exchange** (RFC-8693).



## OpenAPI

````yaml /openapi/phrase-platform.json post /oauth/token
openapi: 3.0.0
info:
  title: Phrase Platform API
  description: |
    ### Phrase Platform related API.
  version: 1.0.0
  termsOfService: https://phrase.com/terms/
  contact:
    url: https://phrase.com
servers:
  - url: https://eu.phrase.com/idm/
    description: The API server for EU data center.
  - url: https://us.phrase.com/idm/
    description: The API server for US data center.
security: []
tags:
  - name: OAuth
    description: OAuth Protocol
paths:
  /oauth/token:
    post:
      tags:
        - OAuth
      summary: Token Endpoint
      description: >-
        Token Endpoint provides tokens according to **OAuth 2.0/OIDC 1.0**
        (RFC-6749) specifications and its extension **OAuth 2.0 Token Exchange**
        (RFC-8693).
      operationId: getToken
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OauthTokenRequest'
      responses:
        '200':
          description: Token is issued to the caller
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OauthToken'
        '400':
          description: Request is rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OauthTokenError'
components:
  schemas:
    OauthTokenRequest:
      oneOf:
        - $ref: '#/components/schemas/ExchangeTokenGrant'
      discriminator:
        propertyName: grant_type
        mapping:
          urn:ietf:params:oauth:grant-type:token-exchange:
            $ref: '#/components/schemas/ExchangeTokenGrant'
    OauthToken:
      required:
        - access_token
        - issued_token_type
        - token_type
        - expires_in
      properties:
        access_token:
          description: Access token for oauth
          type: string
        issued_token_type:
          description: Type of the access_token (RFC-8693)
          type: string
        token_type:
          description: Token type - defines how the token should be used
          type: string
        expires_in:
          description: Number of seconds the access token is valid
          type: integer
    OauthTokenError:
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/OauthTokenErrorType'
        error_description:
          description: Human readable description of the error
          type: string
    ExchangeTokenGrant:
      required:
        - grant_type
        - subject_token
      properties:
        grant_type:
          description: Type of grant for access token
          type: string
        resource:
          description: Target resource URI (not supported)
          type: string
        audience:
          description: Logical name of the target service (not supported)
          type: string
        scope:
          description: >-
            space-delimited, case-sensitive list of requested grants (not
            supported)
          type: string
        requested_token_type:
          description: Token type requested
          type: string
          default: urn:ietf:params:oauth:token-type:access_token
        subject_token:
          description: Token of the subject
          type: string
        subject_token_type:
          description: Type of the token (not supported)
          type: string
          default: urn:phrase:params:oauth:token-type:api_token
        actor_token:
          description: Acting party token (not supported)
          type: string
        actor_token_type:
          description: Type of the actor token (not supported)
          type: string
    OauthTokenErrorType:
      description: OAuth 2.0/OIDC 1.0 error codes
      type: string
      enum:
        - invalid_request
        - invalid_client
        - invalid_grant
        - unauthorized_client
        - unsupported_grant_type
        - invalid_scope
        - interaction_required

````