{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robosystems-ai/json-schema/robosystems-ai-oauth-init-response-schema.json",
  "title": "OAuthInitResponse",
  "description": "Where the user authorizes: a redirect URL, or a token for an embedded widget.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robosystems-ai-connections-api-openapi.yml#/components/schemas/OAuthInitResponse",
  "properties": {
    "auth_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Auth Url",
      "description": "URL to redirect the user to for authorization. Null for providers that authorize in an embedded widget (Plaid: see link_token)."
    },
    "link_token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Link Token",
      "description": "Plaid only: the token that opens Plaid Link. Link's public_token completes the flow through the callback, as code."
    },
    "state": {
      "type": "string",
      "title": "State",
      "description": "OAuth state for security"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "title": "Expires At",
      "description": "When this OAuth request expires"
    }
  },
  "type": "object",
  "required": [
    "state",
    "expires_at"
  ]
}