POST Generate OAuth Client Token

Generate oauth client token

Headers
  • X-Request-ID
    Type: string
    required

    Unique request identifier

  • Application
    Type: string
    required

    Application key

  • Accept
    Type: string
    required

    Accept header

  • API-version
    Type: string
    required

    Api version

  • Basic Authorization
    Type: string
    required

    O_AUTH_CLIENT_ID and OAUTH_SECRET

  • X-QB-Enabled
    enum
    required

    Header which if sent with value 'true' will allow usage of the query building feature in response (through the request's query params). It is mandatory for this part of the documentation.

    values
    • true
    • false
Body
application/json
Responses
  • application/json
Request Example for post/oauth/tokens
curl https://api-public-demo.menu.app/api/oauth/tokens \
  --request POST \
  --header 'X-Request-ID: c10b4a70-6274-490d-80a0-03e7bb826937' \
  --header 'Application: ' \
  --header 'Accept: application/json' \
  --header 'API-version: 5.0.0' \
  --header 'Basic Authorization: Authorization: Basic e3tPQVVUSF9DTElFTlRfSUR9fTp7e09BVVRIX1NFQ1JFVH19' \
  --header 'X-QB-Enabled: true' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'grant_type=client_credentials' \
  --data-urlencode 'scope=webhooks-management customer-auth order'
{
  "status": "OK",
  "code": 200,
  "data": {
    "oauth_token": {
      "access_token": "d4c129d3f4560c2beaa3a1a3b15bb771a7038a4bbb680a3912c9ea284d07b291",
      "token_type": "bearer",
      "scope": "webhooks-management",
      "expires_in": 86399
    }
  }
}