Skip to content
Console
On this page

Begin oauth2 authorization on a connection provider

Begins an expiring hosted OAuth 2.0 authorization ceremony for an OAuth 2.0 ConnectionProvider.

Begins an expiring hosted OAuth 2.0 authorization ceremony for an OAuth 2.0 ConnectionProvider. Returns an authorization_url carrying an expiring one-use state token handled by GET /v1/connections/oauth2:callback.

  • Path POST https://api.sylphx.com/v1/orgs/acme/connection_providers/connection-provider:beginOauth2Authorization
  • Scope connections:write
  • Effect write — a successful call changes state.
  • Collection connection_providers

Request

FieldTypeWhat it is
namestringOAuth 2.0 ConnectionProvider resource name. Required.
connection_idstringTarget Connection id to create or reauthorize on callback; server-assigned when empty.
post_authorize_redirect_uristringOptional HTTPS redirect destination after callback completion.
scopesstring[]Optional scopes overriding the provider defaults.
extra_authorize_paramsmap<string, string>Additional per-request query parameters appended to authorize_url.
provider_metadatamap<string, string>Optional non-secret metadata persisted onto the resulting Connection.
external_account_idstringOptional non-secret external account id recorded on creation.

Response

FieldTypeWhat it is
authorization_urlstringFull authorization URL to open in a browser; carries a one-use expiring state.
callback_urlstringHosted callback URL handled by Sylphx Connections.
expire_timetimestampWhen the authorization state expires (ten minutes after begin).

Errors

Every error arrives in the body Errors describes.

Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/connection_providers/connection-provider:beginOauth2Authorization" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'