OAuth Callback (Faire → SKU)
GET/faire/callback
OAuth callback hit by Faire after the user authorizes the app. Not called manually — Faire redirects the user's browser to this URL.
Flow:
- Reads the
stateparameter to resolve the workspace and the integration instance the flow started from (CSRF protection). - Calls Faire's token endpoint to exchange
authorization_codefor a long-livedaccess_token. - Persists the access token + granted scopes on the integration instance.
- Redirects the browser back to the workspace's own host —
https://{workspace}.sku.io/v2/integrations/faire?filter[integration_instance_ids]={id}on success, orhttps://{workspace}.sku.io/v2/integrations/faire/settings?filter[integration_instance_ids]={id}&oauth_error=...on failure.
Faire is registered with a single shared callback URL, so the callback can land on a host other than the workspace's own. The state value carries the originating workspace, and the redirect in step 4 always points back at that workspace's host.
Query Parameters:
state(required) - CSRF state, format{app_url}~{workspace}_{instance_id}authorization_code(required, aliascode) - One-time auth code from Faire
Auth: No Bearer token. Faire redirects the user's browser, so the request arrives unauthenticated and is authorized by the state value alone.
Errors:
400 State mismatch- The state is missing, expired, or does not resolve to an instance404 Faire integration not found- Instance referenced by state has been deleted- Redirect with
?oauth_error=...- Token exchange failed at Faire's side
Request
Responses
- 302
- 401
- 403
- 429
Found
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.