question

gomo-9149 avatar image
0 Likes"
gomo-9149 asked ·

Insufficient permissions to fulfill the request when making call to Marketing API

Hi. I am trying to make calls to the Marketing API, in specific, the ad_campaign endpoint to receive a list of campaigns. I even tried the endpoint to create a report on Promotions listing. However, I get the same error for both.

{ "errors": [ { "errorId": 1100, "domain": "ACCESS", "category": "REQUEST", "message": "Access denied", "longMessage": "Insufficient permissions to fulfill the request." } ]}

For the getCampaigns endpoint, I did not use any parameters or headers. I just mentioned the Authorisation as Bearer token in Postman.

I checked the documentation and both endpoints required user access token obtained through the authorization code grant flow. That's the same process I followed to retrieve the access token. While obtaining the user consent, I used the scope below and that's the same scope I used to refresh the access token.

https://api.ebay.com/oauth/api_scope/sell.marketing

Can someone please assist me to solve this issue?

oauth scopesmarketing apiuser-token
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered ·

Hi @gomo-9149,

Can you please try to get an user token by clicking on 'Get OAuth User Token' in our API Explorer and retry the call.

Ref: https://developer.ebay.com/my/api_test_tool?index=0&env=production&api=marketing&call=ad_report-report_id__GET&variation=json

If issue still persists please let me know.

Best Regards ,
eBay Developer Support

· 1 · Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Sagar,

I couldn't reply as a comment so I've added it as an answer below.

Thanks

Gowri

0 Likes 0 · ·
gomo-9149 avatar image
0 Likes"
gomo-9149 answered ·

Hi Sagar @,

I am trying to create a Promoted Listings report. I know our company has Promoted Listings set up through ChannelAdvisor platform. I did not know our campaign ids so I called the getCampaigns endpoint, but I got no data in the response as below:

"href": " https://api.ebay.com/sell/marketing/v1/ad_campaign?offset=0&limit=10";, "total": 0, "campaigns": [], "limit": 10, "offset": 0 I tried creating an account performance report instead with a request payload as in Screenshot 2021-01-13 at 2.49.50 PM.png

However, I get the following error and I'm asked to reach out to support. Screenshot 2021-01-13 at 2.50.41 PM.png

Please can you advise me how I can solve the following issues

1. Access token obtained in API explorer works but not the one obtained through authorization code flow.

2. Why campaign ids are not returned in the getCampaigns endpoint

3. How to solve the error I'm getting in the screenshot above.

Would really appreciate the help.

Thanks,

Gowri


· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gomo-9149 avatar image
0 Likes"
gomo-9149 answered ·

Hi Sagar @,

Thanks for your response.

I tried the User token from API Explorer for getPromotion endpoint. I got the response.

{ "href": " https://api.ebay.com/sell/marketing/v1/promotion?limit=200&offset=0&marketplace_id=EBAY_GB";, "total": 0}

The response seems okay but there's no data. We have promoted listings on eBay for our company which are managed through a platform called ChannelAdvisor. Could that be the reason I'm not able to get data through the API?

How do I get it to work when using the token obtained through the authorisation code flow or by using refresh token?

Thanks,

Gowri

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.