Why Am I Encountering a Scopes Mismatch Error While Testing a Custom OAuth App for Hubspot on Connect Link?

This topic was automatically generated from Slack. You can find the original thread here.

hey Danny, i’ve seen you helping others with Connect Link questions, so thought i’d see if you could help with an issue i’m facing. i’ve created a custom oauth app for hubspot that i’m testing with Connect Link. when trying to authenticate, i keep getting an error that my scopes don’t match and noticed that the install url generated has a bunch of optional scopes added that i didn’t configure in my oauth app in pipedream or in hubspot. have others encountered this issue as well or am i doing something wrong?

Ah yes I have a suspicion as to what’s happening. Can you confirm which scopes you’re configuring for your OAuth client for HubSpot?

yep, all the scopes under optional_scope= in this screenshot are not intended, and all the scopes under scope= are the ones i’ve configured in HS and Pipedream

Okay, yea the issue is that that optional_scope param is hardcoded for HubSpot on our end, and as you’ve discovered, the scopes you pass in the authorization request must exactly match what you configure in their UI for your OAuth client, which is annoying.

I’m discussing a solution w/ the team

ah i see, thank you!