APIs & Integrations

johannes-m
Participant

Hubspot Oauth2 not working properly with state parameter in redirect_uri

If we mention the redirect_uri in the app configuration and if we pass some value to the state parameter we get the following error.
Couldn’t complete the connection
The redirect_uri doesn't match the client registered redirect_uri. Please contact the app developer.
 
For some weird reason it works perfectly if we do not mention anything in the redirect_uri of app configurations. I am afraid it might stop working in the future.
 
0 Upvotes
3 Replies 3
zaklein
Contributor | Platinum Partner
Contributor | Platinum Partner

Hubspot Oauth2 not working properly with state parameter in redirect_uri

Hi @johannes-m 

I was able to successfully install a test HubSpot app, while retaining the "state" URL parameter (as per the HubSpot documentation you shared). Can you please confirm these are the steps you have taken:

Hope this helps. Please let me know how you get on 🙂

All the best,

Zach

0 Upvotes
dennisedson
Community Manager
Community Manager

Hubspot Oauth2 not working properly with state parameter in redirect_uri

Doesn't look like you can add that param in the app auth. 

@zaklein , any way you can think of adding this?

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
johannes-m
Participant

Hubspot Oauth2 not working properly with state parameter in redirect_uri

As per the documentation https://developers.hubspot.com/docs/api/working-with-oauth it should support state parameter. In our case we need to pass a middleware token to the redirect URI through the Oauth mechanism to authenticate the user into our system after Oauth process. 

0 Upvotes