Connection flow
After your backend has obtained a connect token (typically by exchanging an access token during token exchange), you open the Connect UI so the user can authorize an app. The Connect UI URL includes the app as a path segment and the connect token as atoken query parameter. Optionally, pass a theme parameter to apply partner-specific branding to the Connect UI. There are two approaches.
Option 1: Popup with postMessage
Open the Connect UI 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 UI 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 UI 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.