{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/figshare/json-schema/figshare-create-oauth-token-schema.json",
  "title": "CreateOAuthToken",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/figshare-oauth-api-openapi.yml#/components/schemas/CreateOAuthToken",
  "required": [
    "client_id",
    "client_secret",
    "grant_type"
  ],
  "type": "object",
  "properties": {
    "client_id": {
      "type": "string"
    },
    "client_secret": {
      "type": "string"
    },
    "grant_type": {
      "type": "string",
      "enum": [
        "authorization_code",
        "refresh_token",
        "password",
        "client_credentials"
      ]
    },
    "code": {
      "type": "string",
      "description": "Required if grant_type is 'authorization_code'"
    },
    "refresh_token": {
      "type": "string",
      "description": "Required if grant_type is 'refresh_token'"
    },
    "username": {
      "type": "string",
      "description": "Required if grant_type is 'password'"
    },
    "password": {
      "type": "string",
      "description": "Required if grant_type is 'password'"
    }
  },
  "x-tag": "oauth"
}