OAuth2 Questions about state and correlationId


Do you have an example of how to use state with the OAuth2 implementation?

I tried something like this:

and got back something like this:

But I cannot seem to use it on subsequent messages - specifically within the contacts API.

Also, do you have any information on how to use the correlationId that is returned from API calls?

P Smith

Integration with OAuth 2.0

Hi @psmith

The state parameter won’t have any meaning to HubSpot, it’s only be used by your server to verify the user in your system:

As far as accessing the APIs, you’d need to use the code parameter you get in the redirect URL to generate an access token, then use that access token to authenticate with our APIs.