Access Products API with OAuth 2.0 | requires any of [crm-public-object-api-access]

Hi all,

I’m currently trying to retrieve and create products via Products API using OAuth 2.0 authentication, but I got an error :

“This oauth-token (x x x) does not have proper permissions! (requires any of [crm-public-object-api-access])”

I can access Companies, Contacts and Deals with my token but I can’t access products.

I also tried to use Hapikey and it works with it but Hapikey is a bad authentication and I prefer to use OAuth 2.0.

I know than Products API is under development so maybe the API don’t work with OAuth but I did not see it anywhere.

Does someone already got this error or have an idea of why it appends ?

PS : excuse me for spelling errors, I’m french and I have never been good in english even if I try to make the less of them
wink.png

I’m still blocked with this issue.

Does someone know how to add [crm-public-object-api-access] permission ?

I would like to use the OAuth 2.0 for products as for other APIs if possible.

Thanks.

Hi @David_Couturier,

Can you give me the scopes you’re requesting? You need to request the e-commerce scope for access to products/line items:

developers.hubspot.com

Initiate an Integration with Oauth 2.0

https://app.hubspot.com/oauth/authorize - Initiate authentication for an app using OAuth 2.0

Oh the scopes ! I completely forgot this notion.
I was providing ‘contacts’ and ‘automation’ scopes like in the documentation’s example and did not see the one for ‘products’ and ‘line items’.

Thanks Derek_Gervais for your answer, it now work
wink.png

(And sorry for this stupid mistake ^^)

I can mark this post as solved !