# Request OAuth Token

This endpoint is to generate a short-lived JSON Web token (JWT)

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

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

  - `grant_type` (string, required)
    Possible values:
    Enum: "client_credentials", "payment_intents"

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

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

  - `payment_intent_id` (string)

## Request examples:

  - `Default` (unknown)

## Response 200:

  - `200` (unknown)
    Successful operation

## Response 200 fields (application/json):

  - `access_token` (string)

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

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

## Response 400:

  - `400` (unknown)
    Bad request, [https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400)

## Response 400 fields (application/json):

  - `error` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized, [https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401)

## Response 401 fields (application/json):

  - `error` (string)

  - `error_description` (string)

  - `error_uri` (string)

## Response 500:

  - `500` (unknown)
    Internal Server Error, [https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500)

## Response 500 fields (application/json):

  - `responseCode` (string)

  - `responseDescription` (string)

## Response 200 examples:

  - `Default` (unknown)

