User

Finish signing the current user in to HubSpot

Exchanges the authorization code HubSpot redirected back with, checks the user signed in to the HubSpot account their organization connected, finds their HubSpot owner by their HubSpot email (preferring the owner with their HubSpot user id), and stores the user's tokens and owner. Answers the user's HubSpot settings. Requires integration-hubspot and a connected portal.

post/api/integration/hubspot/user/access-token

Request

Request body

codestring required

The authorization code HubSpot sent to the redirect URI

statestring required

The state HubSpot sent back, as issued by the authorize-url endpoint

Response

The current user's HubSpot settings, with hubspot_connected true.

connectedboolean

True when the user's organization has a connected portal whose token is still valid, whatever the user's permissions

has_set_hubspot_integrationboolean

True when the user's organization has a connected portal whose token is still valid and the user holds the HubSpot integration permission

hubspot_connectedboolean

True when the user has signed in to their organization's connected HubSpot account themselves, so their exports can use their own sign-in and set them as Contact Owner. False means the next HubSpot export should ask them to sign in.

token_invalid_atstring date-time nullable

Set when the connection needs to be set up again

Changes

No recorded changes to this operation across all 2 revisions of this API.