# Request OAuth Token

Endpoint: POST /authorization/oauth/token
Version: 2.2.0

## Request fields (application/x-www-form-urlencoded):

  - `grant_type` (string, required)
    Possible values:
  - client_credentials: Pass this for all standard integrations.
  - payment_intents: Pass this if you are requesting a short lived OAuth token for payment intents. Applicable only for the mobile SDK integration
    Enum: "client_credentials", "payment_intents"

  - `client_id` (string, required)
    Client ID provided by Axepta Online. This is your merchant ID

  - `client_secret` (string, required)
    Client secret provided by Axepta Online. This is your API key

  - `payment_intent_id` (string)

## Response 200 fields (application/json):

  - `access_token` (string)

  - `token_type` (string)
    Enum: "bearer"

  - `expires_in` (number)
    Token expiry time in seconds

## Response 400 fields (application/json):

  - `error` (string)
    Example: "Invalid payment_intent_id"

## Response 401 fields (application/json):

  - `error` (string)
    Example: "unsupported_grant_type"

  - `error_description` (string)
    Example: "The specified 'grant_type' is not supported."

  - `error_uri` (string)
    Example: "https://documentation.openiddict.com/errors/ID2032"

## Response 500 fields (application/json):

  - `responseCode` (string)
    Example: "A specific identifier for the error cause"

  - `responseDescription` (string)
    Example: "A brief message explaining the error"


