Must have scope DEAL_LINE_ITEM_READ

oauth

#1

I'm getting this error as I list Line Items. This was authenticated via an hapikey.

{"status":"error","message":"Must have scope DEAL_LINE_ITEM_READ","correlationId":"d2165db2-5793-4c52-a4de-7d1df2c151a8","requestId":"24068fba164296d62eb79bf7b8bdeabb"}

Looks like it's an issue on your side that relates to these tickets, yes?



#2

Hi @liz,

Possibly, but that isn't necessarily related. Can you give me your Hub ID, and the request you're trying to make?


#3

@Derek_Gervais
Hub ID: 4566744
curl -X GET https://api.hubapi.com/crm-objects/v1/objects/line_items/paged?hapikey=<HAPI_KEY>

Also, do you mind replying and adding our test portal the access for Products API? Here's the link: How to access the Products API to create products

The thread has accumulated with several responses awaiting your action. Thanks.


#4

Hi @liz,

You should be all set; it looks like it was related to the same scoping issue mentioned in that other thread. The test portal in question has access to Sales Pro (and by extension, line items).


#5

Hey Derek,

Is it possible to implement ecomm bridge without sales pro (access to products, line items seems dependant on it)

Nick


#6

Hi @NickMontagu,

It is possible to implement an Ecommerce Bridge API without Sales Pro; the Ecommerce Bridge API technically only requires the integration-sync scope. The CRUD methods of the Products API can only be accessed by a portal with Sales Pro, but an integration with the integration-sync scope can create products by sending sync messages.


#7

Hi @Derek_Gervais,

I'm having the same problem. I'm using Line Items API , which I understand is in preview. Our company has two HubSpot accounts. For one account I'm able to read line item with HAPI key without any problems. But for our second account I'm using OAuth authentication and I'm getting "Must have scope DEAL_LINE_ITEM_READ" error. Do you think that something must be set in our account?

Thanks.

Dusan


#9

Hi @DusanQuadro,

It's likely because the OAuth token you're using did not request the e-commerce scope. Can you use the following endpoint to check the scopes associated with your token?


#10

Hi @Derek_Gervais,

thank you for your answer. Yes, you're right, the e-commerce scope is not among scopes of the OAuth token. Only these scopes exist for the OAuth token:

"scopes": [
"contacts",
"oauth"
],

So I guess I need to create an authorization URL again which will include also e-commerce scope?

Thanks,

Dusan