I'm able to connect with OAuth successfully using only this scope, but once I add additional scopes I get the following error.
Authorization failed because there is a mismatch between the scopes in the install URL and the app's configured scopes. Please contact the app developer.
This happens if I try to add the scopes before establishing the initial connection, or after establishing the initial connection and using the "Reconnect" option.
Has anyone encountered this before? Do I have to set scopes from the Hubspot side as well? Does that need to be done from a Hubspot Developer account rather than a standard account?
Generally speaking, OAuth2 apps do need to be configured with specific scopes when set up on the resource side of things. As such, this seems like an issue with the HubSpot integration. I'll talk to the team about a fix!
In the meantime, it's pretty easy to set up OAuth2 for a regular REST API query and to integrate with HubSpot that way! Note that this does require a developer account on HubSpot, though.
Let me know if you have any questions about implementing the above workaround. I'll also keep you updated here.
Thanks for the suggestion @Darren. I've started the REST API setup with OAuth2 and still running into the same error. Here are the settings I'm trying to figure out on the resource setup:
Retool will construct the full URL based on the information you specify here! As far as scopes are concerned, it's important that you specify them both in Retool and in the configuration of the HubSpot app:
In the resource configuration, make sure you add an Authorization header with a value of Bearer OAUTH2_TOKEN. I neglected to include that in my earlier screenshot!
Thanks, that fixed it, silly oversight on my part.
The REST API resource will work nicely as a temporary (or perhaps permanent) workaround, but I'd definitely like to stay updated for any fixes on the native integration.
I believe I'm getting a similar error. I am trying to create an app for Real Time Updates to a 3rd party dialer (Connex)
Connex has a marketplace item for this to be done, where we enter the client id/secret/other details and then authorize through Hubspot. I am getting the error "Authorization failed because there is a mismatch between the scopes in the install URL and the app's configured scopes. Please contact the app developer."
Unless this is a Hubspot issue, the only thing I can think is that I need to set some of my scopes to be either conditionally required or optional? But not sure why that would be the case.
I'm afraid I can't be of much help, as it looks like this is an issue with integrating two non-Retool resources. That said, you're probably right that the root of the issue is a similar one - the scopes listed in the initial authorization request being made from Connex to HubSpot don't match up with the scopes that have been configured.
I hope that gives you some guidance, but will leave this conversation open for anybody else from the community to jump in.
Hey @henrymeiklejohn! Thanks for your patience - I definitely intended to respond here sooner.
In testing, I wasn't able to immediately replicate the behavior that you're describing. Even with the option to Share credentials between users toggled on, Retool successfully tracked a distinct set of auth tokens for each environment.
I took a screen recording of my test here, including the configuration of the REST API resource. Take note of any discrepancies and definitely let me know if you continue to have issues with this!
No significant updates, unfortunately! I've bumped the internal conversation on your behalf in order to hopefully get the issue triaged as soon as possible. The workaround described here should be a reliable solution, though! Let me know if you have any questions about getting it set up.
Each time I attempt to connect via Oauth with the scope crm.objects.companies.read, I get the following error on the Hubspot side during Oauth setup:
"Couldn't complete the connection Authorization failed because there is a mismatch between the scopes in the install URL and the app's configured scopes. Please contact the app developer".
In the API response, I get more info:
This app hasn't been granted all required scopes to make this call. Read more about required scopes here: HubSpot Developer Documentation. One or more of the following scopes are required: crm.schemas.companies.read, crm.objects.companies.read.
I tried adding both scopes and each one individually and kept getting the same error.
I don't get this error when I configure a Retool resource to integrate with Hubspot via Oauth with the scope crm.objects.contacts.read, but I want to pipe Company data into my Retool environment as read only, not Contacts.
This definitely sounds like the same issue that @henrymeiklejohn initially described above. Unfortunately, the underlying cause hasn't yet been addressed and the best alternative is to configure a custom REST resource with OAuth. You can find more info about this workaround at the top of the thread.
Don't hesitate to ask any questions! In the meantime, I'll reach out internally to get a status update.