jlevers / selling-partner-api

A PHP client library for Amazon's Selling Partner API
BSD 3-Clause "New" or "Revised" License
404 stars 196 forks source link

Application do not have access to some or all requested resource #476

Closed muglali20 closed 1 year ago

muglali20 commented 1 year ago

Problem description:

Application do not have access to some or all requested resource I get an error

Error:

[400] {
  "errors": [
    {
      "code": "InvalidInput",
      "message": "Application do not have access to some or all requested resource",
      "details": ""
    }
  ]
}

The same error returns when I buy a new token. Can You Support On This Issue?

Code

$data_elements = array('buyerInfo'); 
$result = $apiInstance->getOrder($order_id,$data_elements);

Seller Central SP API config page screenshot

https://i.hizliresim.com/k2jjuyf.png https://i.hizliresim.com/3xrk746.png

statsmarketing commented 1 year ago

Same issue here after updating the SDK from older version and utilizing the getOrder API.

muglali20 commented 1 year ago

I wonder what we need to do, does everyone have this problem, how can we overcome it?

muglali20 commented 1 year ago

@schellj Hello; Can you support for this Issue?

schellj commented 1 year ago

It's a bit hard for me to tell since your screen shots aren't in english, but your app seems to have all of the access scopes. Has Amazon approved your app?

muglali20 commented 1 year ago

yes, can you see it here?

https://sellercentral.amazon.com.tr/selling-partner-appstore/dp/amzn1.sp.solution.3fcbece7-7767-43a8-9df6-1c7fe32befb9

schellj commented 1 year ago

Yes, I see your app.

I'm not familiar with this repo, so it's a little hard to help debug. However, I do know that in order to get the buyer info from an order you need a restricted data token (RDT); is your code requesting and using one?

muglali20 commented 1 year ago

Which library do you use, can you get customer cargo information? necessary information for the cargo I need

schellj commented 1 year ago

Sorry, but I can't really get into that, but your code and/or whatever library you use is going to need to use an RDT to get that data.

muglali20 commented 1 year ago

#

Sorry, but I can't really get into that, but your code and/or whatever library you use is going to need to use an RDT to get that data.

can you support this

@jlevers

jlevers commented 1 year ago

@muglali20 this library automatically requests an RDT for you if you have PII access. Do you have access to one or both of the Tax Invoicing or Tax Remittance roles? I can't tell from your screenshots as I don't speak Turkish.

What version of the library are you using, and did you recently upgrade from an older version?

muglali20 commented 1 year ago

@muglali20 this library automatically requests an RDT for you if you have PII access. Do you have access to one or both of the Tax Invoicing or Tax Remittance roles? I can't tell from your screenshots as I don't speak Turkish.

What version of the library are you using, and did you recently upgrade from an older version?

@jlevers thanks for your answer. I downloaded and installed the library up to date. Can you check the application images attached? Could you please help me as to why I am getting this error? https://i.hizliresim.com/jaqx9t5.png https://i.hizliresim.com/1holpbi.png

jlevers commented 1 year ago

Delegating access to PII (as you've done for your SP API application) does not allow you yourself to access it. If you want to directly access PII, you need to apply for access to whichever restricted roles you need (one or more of Direct-to-Consumer Shipping, Tax Remittance, and Tax Invoicing, depending what you need – details here). The two restricted tax-related roles will both get you access to buyer info.

Until you get approved for restricted roles, you will not be able to make requests to the SP API requesting PII.