Reconnect Gmail
GET/v1/integrations/gmail/installations/{installation_id}/oauth/authorize
Authorization
Bearer token for API authentication. Format: `Bearer YOUR_API_KEY`
Path Parameters
Gmail installation ID
Query Parameters
Opaque value echoed back as `reference` on the return URL, so your app can match the outcome to the user who started the flow
Constraints
Response
307 with Location set to the provider's consent page, or 404 when the organization has no Gmail installation with this ID. The person must sign in with the Google account already connected to the installation. The installation keeps its store. After consent the browser is redirected to the return URL registered on the organization's app, with these query parameters appended:
The connector: gmail
The reconnected installation. Present when `status` is `connected`.
Why consent failed. Present when `status` is `error`. `reconnect_account_mismatch` means consent was given for a different account than the installation's. Provider errors such as `access_denied` are passed through.
Possible values
access_deniedmissing_codereconnect_account_mismatchinvalid_statetoken_exchange_failedcallback_failedThe `reference` passed to reconnect, when one was passed. Present on both outcomes.
curl -s -o /dev/null -w '%{redirect_url}' \
'https://api.mixedbread.com/v1/integrations/gmail/installations/2f1c9a8e-6b4d-4e3a-9c1f-7d8e5b6a4c21/oauth/authorize?reference=user-42' \
-H 'Authorization: Bearer YOUR_API_KEY'# Location header of the 307: send the browser here
https://accounts.google.com/o/oauth2/v2/auth?client_id=…&redirect_uri=…&scope=…&access_type=offline&state=…
# Return URL after consent
https://platform.example.com/connected?provider=gmail&status=connected&installation_id=2f1c9a8e-6b4d-4e3a-9c1f-7d8e5b6a4c21&reference=user-42
# Return URL when consent was given for a different account
https://platform.example.com/connected?provider=gmail&status=error&error=reconnect_account_mismatch&reference=user-42