Browse the API reference

OAuth Callback

post/v1/graphs/{graph_id}/connections/oauth/callback/{provider}

Part of Connections.

Completes the OAuth authorization flow after provider redirect. Exchanges the authorization code for tokens, stores them, and triggers an initial sync. This is a redirect target — not typically called directly. Plaid: pass Link's public_token as code; a bank already connected to the graph is refused (409 DUPLICATE_BANK_CONNECTION).

Authentication

Authenticate in any one of these ways — not all of them:

  • API key in the X-API-Key header.
  • Bearer token in the Authorization header.

Path parameters

NameTypeDescription
providerrequiredstringOAuth provider name
graph_idrequiredstringGraph Id

Request body

Required, application/json.

FieldTypeDescription
coderequiredstring

Authorization code from the OAuth provider (Plaid: the public_token Link returned)

staterequiredstring

OAuth state for verification

realm_idoptionalstring

QuickBooks-specific realm ID

erroroptionalstring

OAuth error if authorization failed

error_descriptionoptionalstring

OAuth error details

Example request

curl
curl -X POST "https://api.robosystems.ai/v1/graphs/{graph_id}/connections/oauth/callback/{provider}" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "string",
  "state": "string"
}'

Responses

200 Successful Response

FieldTypeDescription
successrequiredboolean

Whether the connection was established

messagerequiredstring

Human-readable outcome of the exchange

connection_idrequiredstring

Connection the authorization was linked to

auto_sync_task_idoptionalstring

Task id of the initial sync started after connecting, or null when no sync was kicked off

StatusMeaning
400Invalid request
401Authentication required
403Access denied
404Resource not found
422Validation Error
429Rate limit exceeded
500Internal server error