Integration with OAuth 2.0



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";


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?


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

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

but get this type of return url :


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?


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.



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.


Does the HubSpot OAuth 2.0 support the state parameter (i.e. on the initial authorization request? If so, that is typically the way to pass data from the initial auth request to the redirect url.


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


Update: I was incorrect. Custom query parameters can be passed to the redirect URI if they are properly URL-encoded. See this topic for more information.