{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/yawplet/json-schema/yawplet-oauth-token-schema.json",
  "title": "OAuthToken",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/yawplet-oauth-api-openapi.yml#/components/schemas/OAuthToken",
  "type": "object",
  "required": [
    "access_token",
    "token_type",
    "expires_in",
    "scope"
  ],
  "properties": {
    "access_token": {
      "type": "string",
      "description": "Opaque, at_…; send as Authorization: Bearer. Valid one hour, on this site only."
    },
    "token_type": {
      "type": "string",
      "enum": [
        "Bearer"
      ]
    },
    "expires_in": {
      "type": "integer",
      "description": "Seconds until the access token expires"
    },
    "refresh_token": {
      "type": "string",
      "description": "rt_…; valid 30 days and rotated on every use"
    },
    "scope": {
      "type": "string",
      "description": "The granted scopes",
      "space-separated": null
    }
  }
}