# apr redirect\_uri adding dynamic parameters

**URL:** <https://community.hubspot.com/t/apr-redirect-uri-adding-dynamic-parameters/22310>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [June 30, 2020, 5:23pm UTC](https://community.hubspot.com/t/apr-redirect-uri-adding-dynamic-parameters/22310 "2020-06-30T17:23:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgrondellcmx](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kgrondellcmx/32/43030_2.png) [@kgrondellcmx](https://community.hubspot.com/u/kgrondellcmx)\
**Post date:** [June 30, 2020, 5:23pm UTC](https://community.hubspot.com/t/apr-redirect-uri-adding-dynamic-parameters/22310/1 "2020-06-30T17:23:19Z")

</div>

Is there a way to add dynamic parameters to the redirect uri? In other words I want my base redirect uri to be [foo.com/fee.asp](http://foo.com/fee.asp) but with each user I will send along an account id and network id which will be unique to the user so [foo.com/fee.asp?act](http://foo.com/fee.asp?act)\_id=1&net\_id=2  
Is there a way to achieve this?

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [July 1, 2020, 6:27am UTC](https://community.hubspot.com/t/apr-redirect-uri-adding-dynamic-parameters/22310/2 "2020-07-01T06:27:02Z")

</div>

Hey @kgrondellcmx,

Do you mean the app redirect uri?

If so, as mentioned by Connor [here](https://community.hubspot.com/t5/APIs-Integrations/OAuth-Redirect-URI-with-custom-parameters/td-p/222051), at the moment it is not possible to set up a dynamic redirect uri. If you haven’t already, I’d recommend jumping over to the [HubSpot Ideas Forum](https://community.hubspot.com/t5/custom/page/page-id/ideaslandingpage) and posting this idea there so that it’s visible to the HubSpot product team and other HubSpot customers and developers. Hopefully this will gather more interest.

---

<div class="post-metadata">

**Author:** ![kgrondellcmx](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kgrondellcmx/32/43030_2.png) [@kgrondellcmx](https://community.hubspot.com/u/kgrondellcmx)\
**Post date:** [July 2, 2020, 2:18pm UTC](https://community.hubspot.com/t/apr-redirect-uri-adding-dynamic-parameters/22310/3 "2020-07-02T14:18:08Z")

</div>

I figured it out. If you leave the redirect url blank it can be anything. Although not ideal it will allow me to pass values back to my application.

---

<div class="post-metadata">

**Author:** ![SMcGarrigle](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/smcgarrigle/32/1529_2.png) [@SMcGarrigle](https://community.hubspot.com/u/SMcGarrigle)\
**Post date:** [April 16, 2021, 11:12am UTC](https://community.hubspot.com/t/apr-redirect-uri-adding-dynamic-parameters/22310/4 "2021-04-16T11:12:24Z")

</div>

So I’ve found a work around for this, create a custom module in Hubspot and use the following code. I don’t know how to link the code without screen grabbing it on here. Inset this code into the custom module, then insert the module into the page you want. This will only redirect based upon the value of one field. you can replicate the ELSE IF section of the code if there are more than 3 options.

To change the code replace where I have put in Capital letters:

NAME1  
NAME2

NAME3

OPTION

These 4 above are up to you to decide and are merely for referencing for the code to work so as long as they are the same above and below then that’s all that matters

WEBSITE1

WEBSITE2

WEBSITE3

These are the web addresses you want the page to re-direct to depending on selection

NAME OF DEPENDENT FIELD

Go to you form and right click on it, click inspect and find out the true name of the value you want to redirect based upon. E.g How\_Much\_Is\_Your\_Budget?

Make sure this is copied exactly how it appears in the inspector.

FIELDVALUE1  
FIELDVALUE2

FIELDVALUE3

Make sure these are copied exactly how it appears in your form for the values is the field we have named above, e.g £1-£2 include the spaces if you have any in the field so it might be £1 - £2

Obviously make sure you update your portal id and form id also at the top where the XXXXX are

 ![41067i70C74C2462F03C7D.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/8/8896e972350f4fa5e728f5c61643564a839438de.png)
