Connection flow
After your backend has obtained a session exchange code (see Authentication & Provisioning), you open the Zapier connect flow so the user can authorize an app. The connect URL includes the app as a path segment and the session exchange code as atoken query parameter. Optionally, pass a theme parameter to apply partner-specific branding to the connect flow. There are two approaches.
Option 1: Popup with postMessage
Open the connect URL in a popup window and listen for a message back with the connection ID.
Option 2: Redirect
Navigate the current window to the connect URL with aredirect_uri. After the user authorizes, Zapier redirects back to your URL with the result as query parameters.
On success
On error
authentication_id as the connection identifier with your access token.
Reconnecting
To reconnect an existing connection (e.g. after it expires), add thereconnect_id parameter to the connect URL. This tells Zapier to re-authorize the same connection instead of creating a new one. The value is the connection’s ID.
Handling popup close
The user may close the popup before completing the flow. Since nopostMessage is sent in that case, poll the popup’s closed property to detect this and reset your UI.