# Integration with OAuth 2.0

**URL:** <https://community.hubspot.com/t/integration-with-oauth-2-0/11952>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [October 23, 2018, 11:34am UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952 "2018-10-23T11:34:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 23, 2018, 11:34am UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/1 "2018-10-23T11:34:16Z")

</div>

# 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”;

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 23, 2018, 1:34pm UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/2 "2018-10-23T13:34:01Z")

</div>

Hi [@Ankit](https://community.hubspot.com/u/ankit),

At this time, redirect URIs cannot contain query parameters, so they are stripped. (See [this similar topic](https://integrate.hubspot.com/t/oauth-redirect-uri-with-custom-parameters/13406).)

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?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 23, 2018, 1:37pm UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/3 "2018-10-23T13:37:53Z")

</div>

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\_uri=https://localhost:3000/integration/auth?token=HubSpot](https://app.hubspot.com/oauth/authorize?client_id=xxxx-xxx-xxx&scope=contacts%20automation&redirect_uri=https://localhost:3000/integration/auth?token=HubSpot)

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](https://localhost:3000/integration/auth?token&code=xxxxx-xxx-xxxx)

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 24, 2018, 8:51pm UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/4 "2018-10-24T20:51:48Z")

</div>

Hi [@Ankit](https://community.hubspot.com/u/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?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 25, 2018, 4:46am UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/5 "2018-10-25T04:46:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 25, 2018, 11:58am UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/6 "2018-10-25T11:58:34Z")

</div>

Hi [@Ankit](https://community.hubspot.com/u/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](https://developers.hubspot.com/docs/methods/oauth2/get-access-token-information), though.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 25, 2018, 1:34pm UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/7 "2018-10-25T13:34:33Z")

</div>

Does the HubSpot OAuth 2.0 support the state parameter (i.e. [Prevent Attacks and Redirect Users with OAuth 2.0 State Parameters - Auth0 Docs](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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 25, 2018, 1:48pm UTC](https://community.hubspot.com/t/integration-with-oauth-2-0/11952/8 "2018-10-25T13:48:50Z")

</div>

Thanks for the input, [@Eric\_Wood](https://community.hubspot.com/u/eric_wood). Per [this topic](https://integrate.hubspot.com/t/oauth2-questions-about-state-and-correlationid/2682), the `state` parameter does seem to be supported.
