APIs & Integrations

Not applicable

Integration with OAuth 2.0

SOLVE

Initiate an Integration with OAuth 2.0 with the redirect url in passing other options like type=abcd,

so after passing the options, but remove my option. so any other idea or method for passing the parameter with static values.

this is the my request URL: let auth_url = login + "/oauth/authorize?client_id=" + clientid + "&scope=contacts%20automation&redirect_uri=" + redirect + "&type=abcd";

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Integration with OAuth 2.0

SOLVE

Thanks for the input, @Eric_Wood. Per this topic, the state parameter does seem to be supported.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
7 Replies 7
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Integration with OAuth 2.0

SOLVE

Thanks for the input, @Eric_Wood. Per this topic, the state parameter does seem to be supported.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Eric_Wood
Member

Integration with OAuth 2.0

SOLVE

Does the HubSpot OAuth 2.0 support the state parameter (i.e. https://auth0.com/docs/protocols/oauth2/oauth-state) on the initial authorization request? If so, that is typically the way to pass data from the initial auth request to the redirect url.

IsaacTakushi
HubSpot Employee
HubSpot Employee

Integration with OAuth 2.0

SOLVE

Hi @Ankit,

Unfortunately, it's not possible to pass any custom query parameters in the redirect URI.

If you need to get identifying information for the portal which is integrating with you, one way is to use this endpoint, though.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Integration with OAuth 2.0

SOLVE

Hi @Ankit,

No, that is not possible at this time. All custom query parameters are removed.

What kinds of tokens or values are you trying to pass?

Isaac Takushi

Associate Certification Manager
0 Upvotes
Not applicable

Integration with OAuth 2.0

SOLVE

Thanks for quick replay,

passing just simple static values of identifying and run custom query.

Like :: i pass the key="value" if i just get return the key and value in url, after fire custom action on db and other.

Thanks

0 Upvotes
Not applicable

Integration with OAuth 2.0

SOLVE

i passed the parameter with static value and after i get the same value in redirect page? is it possible?

like : i call Integration with OAuth 2.0

https://app.hubspot.com/oauth/authorize?client_id=xxxx-xxx-xxx&scope=contacts%20automation&redirect_...

but i can't get the token paramter with value in redierct page,

but get this type of return url :
https://localhost:3000/integration/auth?token&code=xxxxx-xxx-xxxx

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Integration with OAuth 2.0

SOLVE

Hi @Ankit,

At this time, redirect URIs cannot contain query parameters, so they are stripped. (See this similar topic.)

Could you describe your use case in more detail? What types of parameters and values are you passing at this stage in the connection process?

Isaac Takushi

Associate Certification Manager
0 Upvotes