Connect
Install the Zernio app on a HubSpot portal to connect it to a profile, from the dashboard or with the connect API.
Connect a HubSpot portal
Request the authorization link for a profile, then send the user to authUrl:
curl "https://zernio.com/api/v1/connect/hubspot?profileId=PROFILE_ID&redirect_url=https://example.com/done" \
-H "Authorization: Bearer $ZERNIO_API_KEY"{ "authUrl": "https://app.hubspot.com/oauth/authorize?client_id=…", "state": "…" }The user picks a portal and approves the app. HubSpot returns them to Zernio, which saves the account and redirects to redirect_url (or the dashboard) with connected=hubspot, profileId, accountId and username (the portal domain).
Change what syncs
Both settings start on. Turn either off with PATCH /v1/accounts/{accountId}/hubspot-settings:
curl -X PATCH "https://zernio.com/api/v1/accounts/ACCOUNT_ID/hubspot-settings" \
-H "Authorization: Bearer $ZERNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "logMessages": false }'syncContacts creates a HubSpot contact for an inbox contact that matches none. logMessages writes each message on the contact's timeline. Read the current values with GET /v1/accounts/{accountId}/hubspot-settings.
How it behaves
- A profile holds one portal. Reconnecting the same portal refreshes the account in place and keeps its settings; a different portal starts with both settings on.
- Access renews by itself. If the app is uninstalled in HubSpot, the account is marked disconnected the next time a message syncs.
- Disconnecting the account in Zernio uninstalls the app from the portal, unless another Zernio profile still uses that portal.
If it fails
| Error | Cause | Fix |
|---|---|---|
hubspot_profile_has_portal on the redirect | The profile already has a different portal connected | Disconnect it first, or connect this portal to another profile. |
hubspot_access_denied on the redirect | The user declined the app in HubSpot | Start the connect again and approve the app. |
hubspot_invalid_state on the redirect | The link expired or was already used | Request a fresh authUrl. |
hubspot_connection_failed on the redirect | HubSpot refused the code exchange, or the portal could not be read | Start the connect again; contact support if it repeats. |
503 on GET /v1/connect/hubspot | HubSpot is not configured on this Zernio environment | Contact support. |
Related
Was this page helpful?