[URGENT] HubSpot Error on new installation workflow from marketplace

Hi There,

I recently switched to the new workflow of installation from the marketplace, where the oauth URL is generated by HubSpot.

However there is an issue on how HubSpot do it, since it does not add the optional_scopes on the redirect_uri, url, taking to incomplete installations (from the user and features point of view).

How can this be communicated with the HubSpot developers or support asap?? It is producing bad user experience.

Example:

Hey @dgomez-dev - thanks so much for posting in the Community!
To streamline your support process, I’ve merged your second post in the Third-Party Apps group with this post. I’d like to start by tagging in some developer experts to see if they have any insight on workarounds. @Phil_Vallender, @Anton, and @alyssamwilie - any thoughts on this issue?
Additionally, if this seems to be working as-expected and simply reflects an update, I would recommend posting this idea directly in our Ideas Forum. This would allow other users to upvote your idea, expand on it, and echo the need for these adjustments directly to our Products Team.
Shane, Senior Community Moderator

Many thanks! Any update from the developers??

It is not an update, I strongly think is a bug in HubSpot new install workflow from the Marketplace. Optional scopes should be listed in the optional_scope parameter of the install URL.

Hi STierney,

Any update on this? It is clearly a bug on the new install link workflow in the App marketplace listing. Withou the Optional Scopes, the experience of the users is not good, and this is creating me many extra support tickets.

Any comments @Phil_Vallender, @Anton, and @alyssamwilie ?

Thanks,

Hey @dgomez-dev - thanks for following up here!
I’m currently inquiring with our internal team regarding this matter, and I will be sure to provide you with any updates I receive!
Shane, Senior Community Moderator

Hey @dgomez-dev - thanks for your patience!
The team has provided the following context:
“If any optional scope(s) are truly required, then Medicc should define them as required in their app config/settings. If they add the scope(s) as required in the settings, our system will automatically append them to the [required] scope parameter instead of ignoring them since they’re optional scopes.
As for conditionally required and optional scopes, partners often initiate secondary install flows in their platform after the “base” app with required scopes is installed from the Marketplace. Partners often create detailed documentation and/or in-app onboarding flows to ensure customers approve the correct set of permissions for their use cases.”
I hope this provides some clarity!
Shane, Senior Community Moderator

Many thanks @STierney for the help and follow up,

However, I am sorry to insist but this is not an appropriate solution. The optional scopes have a purpose and cannot be just transformed to requiered. As per the documentation:

Access to specific APIs or endpoints depends on HubSpot account tier. If your app can work with multiple types of HubSpot accounts, you can use the optional_scope parameter to include any tiered scopes you work. This way, customers using HubSpot free accounts can still authorize your app, even if they can’t access all of its scopes. Your app must check for and handle any scopes that it doesn’t get authorized for.

So if I put the optional scopes in requiered, there will be users that may not be able to install the full app although they could install something partial workable.

If I keep them in optional, since the Oauth link Hubspot is wrongly generating, some other users will install a basic version although they could have installed something with more features accoring to their tier (or permits). This is not related and independant from a partner sign-in workflow, since this may not need to log in any other 3-rd party portal.

In the marketplace, before the latest change, the install link where provided by the developer where we redirect to the proper Oauth generated by the developer. Now HubSpot marketplace is generating this Oauth, but is missing to include the optional scopes.

I do not understand why the own HubSpot Oauth link is not including the optional scopes as it should be per your own documentation, at least it is a bug. What would be the purpose of having optional scopes then?

Thanks for your help,

David

Hey @dgomez-dev - thanks for following up here. Here is the team’s response to your reply:
“It would help to know exactly what scopes they are concerned with setting as required, and clarifying that we do not currently include optional scopes in the install URL by default to ensure apps have minimum access needed in installed accounts. They can still have customers reauth additional scopes via installs initiated outside of their app listing page. Users would only need to auth net new scopes, any they’ve already approved would remain granted.
If they are necessary to support functionality they should be required. If their primary functionality is restricted to HubSpot customers of a specific tier or above they shouldn’t seek to be successfully installed in lower tier accounts that do not have access to tools the integration relies on. If it’s supplementary functionality then they can leave them as optional and eligible customers can reauth without issue after the marketplace install is successful. At this stage it seems like more information would be helpful but this is working as designed currently.”
Shane, Senior Community Moderator

Hi @STierney

Many thanks for following up on this and help me to put the word on the developers!. It is great that as developers/partners can we have this kind of access.

The solution they proposed is what I have currenty implemented, the user install with basic and then it is prompted to re-authorized if needed on the app.

Although it works, I think it is not the best UX for the users. And I still do not get what is the logic for not including the optional_scopes on the link HubSpot provides. They mention:

“we do not currently include optional scopes in the install URL by default to ensure apps have minimum access needed in installed accounts.”

But including optional_scopes will not affect the minimium access. They will just not appear on the users that do not have the extra access, it will not bother them. But if the customer actually have that access to that optional scopes, it will save her/him re-authorize after for accessing other features. Including optional_scopes will give better access from the beggining to the most advanced users and it will not affect the “less allowed” users.

More info

About the second point, the scopes is not only a thing of tiers. It is a thing on the permits the users have on HubSpot.

“they shouldn’t seek to be successfully installed in lower tier accounts that do not have access to tools the integration relies on.”

So, optional_scopes makes sense, for example, if a user is not admin but want to install the app with a more restricted version (for instance not accessing companies pages if it does not have access). But if the Admin install it, he should be able to have the full featured version from the first installation.

I am not sure, if my point is clear, but in anyways, the solution proposed works, although I think it is not the optimal… and tbh I do not get what would be the disadvanteges to include the optional_scopes on the install link.

Thanks for your time,

David