{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/DataIntegrationAccessTokenResponse", "title": "DataIntegrationAccessTokenResponse", "oneOf": [ { "type": "object", "properties": { "active": { "type": "boolean", "description": "Indicates whether the access token is valid and ready for use, or if reauthorization is required.", "const": true }, "access_token": { "type": "object", "properties": { "object": { "type": "string", "description": "Distinguishes the access token object.", "const": "access_token" }, "access_token": { "type": "string", "description": "The OAuth access token for the connected integration.", "example": "gho_16C7e42F292c6912E7710c838347Ae178B4a" }, "expires_at": { "type": [ "string", "null" ], "description": "The ISO-8601 formatted timestamp indicating when the access token expires.", "example": "2025-12-31T23:59:59.000Z" }, "scopes": { "type": "array", "items": { "type": "string" }, "description": "The scopes granted to the access token.", "example": [ "repo", "user:email" ] }, "missing_scopes": { "type": "array", "items": { "type": "string" }, "description": "If the integration has requested scopes that aren't present on the access token, they're listed here.", "example": [] } }, "required": [ "object", "access_token", "expires_at", "scopes", "missing_scopes" ], "description": "The [access token](/reference/pipes/access-token) object, present when `active` is `true`." } }, "required": [ "active", "access_token" ] }, { "type": "object", "properties": { "active": { "type": "boolean", "description": "Indicates whether the access token is valid and ready for use, or if reauthorization is required.", "const": false }, "error": { "type": "string", "enum": [ "needs_reauthorization", "not_installed" ], "description": "- `\"not_installed\"`: The user does not have the integration installed.\n- `\"needs_reauthorization\"`: The user needs to reauthorize the integration.", "example": "not_installed" } }, "required": [ "active", "error" ] } ] }