Connections

Start a connection

Changed on

Mint a hosted OAuth link to connect an app; send the user to redirect_url. Some apps need setup first (see setup_fields). On return the connection appears in GET /connections.

post/connections/connect

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

object required
toolkit, string required

App slug from the catalog (e.g. gmail)

callback_url, string

Where to return the user after auth

scope, 'account' | 'user'

Who owns the resulting connection. account (default) shares it with the whole workspace; user makes it personal to the authenticated user and invisible to teammates.

Response

Success

ConnectionLink required
object, 'connection_link' required
status, 'INITIATED' required
toolkit, string required
redirect_url, string required

Hosted OAuth URL to send the user to

external_account_id, string
expires_at, string nullable
setup_fields, object[]

Fields the connect page asks the user for besides the OAuth login (e.g. Shopify's shop ID and the client ID/secret of a custom app they must create first, with the redirect URI to register). Empty for plain OAuth apps. Walk the user through these before sending them to redirect_url.

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision