Connect

Get HubSpot OAuth connect URL

Changed on

Initiates OAuth for a HubSpot portal. HubSpot is a connect-only CRM platform: the connected account does not post, read analytics or run ads. One HubSpot portal can be connected per profile; connecting a different portal to a profile that already has one redirects with error=hubspot_profile_has_portal. Redirect the user to authUrl; after authorization, HubSpot returns the browser to Zernio's internal callback and Zernio redirects to redirect_url (or the dashboard when omitted). On success the redirect carries connected=hubspot, profileId, accountId and username (the portal domain); on failure it carries error, platform=hubspot and error_message. Reconnecting the same portal and profile updates the stored connection in place and keeps its settings. Requested scopes: oauth, crm.objects.contacts.read, crm.objects.contacts.write.

get/v1/connect/hubspot

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/connect/hubspot
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Connect-Token

Query parameters

profileIdstring required

Your Zernio profile ID (get from /v1/profiles).

redirect_urlstring

Custom redirect after connection. Must be an absolute http(s) URL or custom app scheme such as myapp://callback; relative and unsafe URLs return 400.

Response

OAuth authorization URL and authenticated state

authUrlstring uri required

HubSpot URL to open in the user agent.

statestring required

Authenticated, expiring OAuth state handled by the callback.

Changes