Hubspot Owners v3

We are hitting an error while trying to hit the “owners” api on Hubspot via the in-built connector.

Recently, Hubspot deprecated their v2.

Is there any plan to update the connector? Connector → Load → Hubspot Query

There is only one option for “Owners” in the datasource field, and it is being rejected on their end as being deprecated.

Any suggestions on how to proceed?

1 Like

Hello @roy.taylor

Welcome to the Matillion Community. its great to see you posting for the first time!

Thanks for your question, to resolve this particular issue you will need to set a connection option with Schema=HUBSPOTV3 this will get it going again.

If you need anything else, please don’t hesitate to ask.

Kind regards, Joe

Thanks, that got us to the next error. Now trying to get the OAuth install working correctly with Hubspot with the new scope.

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.

Unfortunately I don’t know what basic scopes I need to add to be able to configure the data source. I was able to get OAuth happy for that “Authentication”…but I only wanted it for one small scope, but apparently that triggers an issue with the API.

Oh no!

Can you please confirm what scopes you currently have set up in your app? We can look into this and get it resolved @roy.taylor :slight_smile:

Kind regards, Joe

Sure, I’m trying set up a new one to accommodate the changes for that Owners API v3 change.

The app only has a couple set up.

  • crm.objects.owners.read
  • oauth

I get this URL…

https://matillion.bi.community.co/oauth_redirect.html&scope=oauth%20crm.objects.owners.read

With the scope on there.

When I authenticate with Matillion to this app, it gives me this URL…

HubSpot OAuth

I’ve noticed if I edit out the “optional_scope” from this URL, I can get it to authenticate.

However…with that, I still get the error on the component.

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.

1 Like

Thanks @roy.taylor

Let me take this away and speak to the team, I will be back soon.

Kind regards, Joe

Hi @roy.taylor

Can you confirm what version of Matillion ETL you are currently using for me, could you also please turn on auto debug and turn that to debug level 3 and send me a private message with the log file you get please?

Our team can take a closer look at that for you.

Kind regards, Joe

We are on…

Matillion ETL

Version: 1.68.20 (build f08d3c2-270375)

BTW…all the links to support and documentation are now 404 for us.

I’ll see if I can get you logs soon.

I was able to see the full error on the Hubspot Side.

{“status”:“error”,“message”:“This app hasn’t been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.",“correlationId”:“aae2df67-39bc-4503-91a3-f2a2af597d3e”,“errors”:[{“message”:"One or more of the following scopes are required.”,“context”:{“requiredGranularScopes”:[“crm.objects.custom.read”,“crm.schemas.custom.read”]}}],“links”:{“scopes”:“https://developers.hubspot.com/scopes"},“category”:"MISSING_SCOPES”}

So I tried adding those scopes…

And added them to the app in Hubspot…but I’m still getting the scope mismatch (it’s still trying to add in the optional scopes or something??) when trying to authenticate.

Thanks @roy.taylor

My colleague has had a look at that and has been able to replicate this, the solution would be to specify an OauthOptionalScopes when configuring the OAuth as they have done here:

I hope this helps, please keep me posted.

Kind regards, Joe

1 Like

Still failing.

And it won’t tell me which ones.

When I add all the ones that Matillion adds to the “Authorization” link, it also fails with a different message.

I got it auth in Hubspot…then came back to Matillion and got this error

_-
Authorization failed with redirect url of: https://matillion.bi.community.co/oauth_redirect.html?code=na1-94f9-70e6-4d71-87ae-1e10ed7b156a&state=47875185

Message:Error creating settings file: 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.

This cuts off the message part of the error, which lists out the scopes it thinks it wants.


{“status”:“error”,“message”:“This app hasn’t been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.",“correlationId”:“6e747701-b0f5-48dd-b197-821af1aa9275”,“errors”:[{“message”:"One or more of the following scopes are required.”,“context”:{“requiredGranularScopes”:[“crm.objects.custom.read”,“crm.schemas.custom.read”]}}],“links”:{“scopes”:“https://developers.hubspot.com/scopes"},“category”:"MISSING_SCOPES”}

I have both of these scopes already.

I can see the attempted call on the Hubspot side.

But it’s saying the scopes are still wrong.

“This oauth-token (CLaqsoD) does not have proper permissions! (requires all of [users-read])”,“correlationId”:"

I’m down to this error in the logs. It’s odd. because I am seeing some success in the API call, but the whole things is failing.

I can send the logs via DM.

Hi @roy.taylor, thanks so much for sending through that further information. If you do have logs, please feel free to DM them to myself or @Joe-Community-Manager and we can take those to the team.

Thanks so much, Claire

Let me write up my latest findings here today.

The issue I’m seeing now is that it doesn’t seem to “remember” the Schema call.

Is it recommended to put the Schema=HUBSPOTV3 when creating the OAuth connection, or should it be used on the component itself? Both? It seems to break it one way, and then it ignores it the other way.

Thanks @roy.taylor

The schema connection option should not be used when creating the OAuth, it should only be used in the component itself.

Happy to get the team to look at your log files if this does not resolve the issue.

Kind regards, Joe

It won’t validate when I do that.


So I can see in Hubspot that the call the schemas is valid when configuring it, but trying to get sample data or actually running it fails.

On the Hubspot side…

The green are configuring it…but then it tries to call (for the sample) and uses the old one.