# Bug in Redirect URL validation

**URL:** <https://community.hubspot.com/t/bug-in-redirect-url-validation/16705>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, oauth\
**Created:** [October 11, 2019, 1:53pm UTC](https://community.hubspot.com/t/bug-in-redirect-url-validation/16705 "2019-10-11T13:53:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![edossantos3CX](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edossantos3cx/32/101739_2.png) [@edossantos3CX](https://community.hubspot.com/u/edossantos3CX)\
**Post date:** [October 11, 2019, 1:53pm UTC](https://community.hubspot.com/t/bug-in-redirect-url-validation/16705/1 "2019-10-11T13:53:04Z")

</div>

Hello,

When we create an app to integrate with Hubspot, we need to enter a Redirect URL, as part of the OAuth2 authorization flow. For this field, we need to enter an URL having a port number, because our app is not running on the standard HTTPS port 443. Instead, we have it running on port 5001. So, we try to set the Redirect URL to:

[https://mypbx.example.com](https://mypbx.example.com)\*\*:5001\*\*/api/oauth2crm

…which is a valid URL. However, the Hubspot Developer site is not allowing us to enter this URL, it complains about the port number:

 ![RedirectUrlError.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/6/d621231c26bd6b9a3f7d4e9b1ffd175c7a5774ea.png)

If we remove the port number, the validation works, and I can save the changes.

We need that you fix this URL validation bug, so we can proceed with this integration.

Thanks.

Ernesto.

---

<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:** [October 14, 2019, 2:20am UTC](https://community.hubspot.com/t/bug-in-redirect-url-validation/16705/2 "2019-10-14T02:20:29Z")

</div>

Hi @edossantos3CX,

I hope all is well with you 😄

I’m also able to see that if we add port number on domain that isn’t localhost, the redirect url would not validate. For this, I’ll have to check in with the team and I’ll keep you posted!

---

<div class="post-metadata">

**Author:** ![edossantos3CX](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edossantos3cx/32/101739_2.png) [@edossantos3CX](https://community.hubspot.com/u/edossantos3CX)\
**Post date:** [October 14, 2019, 1:42pm UTC](https://community.hubspot.com/t/bug-in-redirect-url-validation/16705/3 "2019-10-14T13:42:22Z")

</div>

Hi @WendyGoh,

Thanks for your response, please keep me posted. This is an important issue for customers using both 3CX and Hubspot, as our installations usually aren’t configured to use the default HTTPS port…

Kind regards.

Ernesto.

---

<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:** [October 29, 2019, 5:42am UTC](https://community.hubspot.com/t/bug-in-redirect-url-validation/16705/4 "2019-10-29T05:42:25Z")

</div>

Hi @edossantos3CX,

We have already pushed out a fix for this and you should be able to add [mypbx.example.com:5001/api/oauth2crm](https://mypbx.example.com:5001/api/oauth2crm) as your redirect URL and save it just fine. Let me know if all is well!

---

<div class="post-metadata">

**Author:** ![edossantos3CX](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/edossantos3cx/32/101739_2.png) [@edossantos3CX](https://community.hubspot.com/u/edossantos3CX)\
**Post date:** [October 29, 2019, 11:54am UTC](https://community.hubspot.com/t/bug-in-redirect-url-validation/16705/5 "2019-10-29T11:54:21Z")

</div>

Hello @WendyGoh,

Thanks for your feedback, indeed we have confirmed that the issue has been solved.

Thanks!

Ernesto.
