{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wso2/main/json-schema/wso2-application-token-generate-request-schema.json",
  "title": "Application access token generation request object",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wso2-application-tokens-api-openapi.yml#/components/schemas/ApplicationTokenGenerateRequest",
  "type": "object",
  "properties": {
    "consumerSecret": {
      "type": "string",
      "description": "Consumer secret of the application"
    },
    "validityPeriod": {
      "type": "integer",
      "description": "Token validity period",
      "format": "int64"
    },
    "scopes": {
      "type": "array",
      "description": "Allowed scopes (space seperated) for the access token",
      "items": {
        "type": "string"
      }
    },
    "revokeToken": {
      "type": "string",
      "description": "Token to be revoked, if any"
    },
    "grantType": {
      "type": "string",
      "default": "CLIENT_CREDENTIALS",
      "enum": [
        "CLIENT_CREDENTIALS",
        "TOKEN_EXCHANGE"
      ]
    },
    "additionalProperties": {
      "type": "object",
      "properties": {},
      "description": "Additional parameters if Authorization server needs any"
    }
  }
}