{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yelp/json-schema/yelp-token-refresh-token-request-schema.json",
  "title": "Refresh Access Token Request",
  "description": "Refresh Access Token Request as per https://www.rfc-editor.org/rfc/rfc6749#section-6",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yelp-oauth-authorization-v2-api-openapi.yml#/components/schemas/TokenRefreshTokenRequest",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/TokenRequestBase"
    },
    {
      "type": "object",
      "properties": {
        "grant_type": {
          "type": "string",
          "description": "Value MUST be set to \"refresh_token\".",
          "enum": [
            "refresh_token"
          ]
        },
        "refresh_token": {
          "type": "string",
          "description": "The refresh token issued to the client."
        },
        "scope": {
          "type": "string",
          "description": "Clients can specify a smaller subset of scopes, if desired. However, they cannot\n    specify any scopes that were not previously defined. If not specified, the original scope is returned.\n"
        }
      },
      "required": [
        "authorization_code",
        "refresh_token"
      ]
    }
  ],
  "$defs": {
    "TokenRequestBase": {
      "type": "object",
      "properties": {
        "client_id": {
          "$ref": "#/$defs/client_id"
        },
        "client_secret": {
          "$ref": "#/$defs/client_secret"
        },
        "grant_type": {
          "type": "string",
          "enum": [
            "authorization_code",
            "refresh_token"
          ],
          "description": "Grant type, as per specified in OAuth2 RFC."
        }
      },
      "required": [
        "client_id",
        "client_secret",
        "grant_type"
      ]
    },
    "client_id": {
      "type": "string",
      "description": "ID assigned by Yelp for the third-party system that will make user-authorized requests to Yelp."
    },
    "client_secret": {
      "type": "string",
      "description": "Client secret assigned by Yelp for the third-party system that will make user-authorized requests to Yelp.",
      "maxLength": 64,
      "minLength": 64
    }
  }
}