amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
611 stars 733 forks source link

Order API not working with RDT #2961

Closed night-fury-web closed 2 years ago

night-fury-web commented 2 years ago

Today I got an error in GetOrders API with restricted data token. It says "Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit". The endpoint works fine without RDT.

Since I use this on my private business application, PII data is needed and this issue is critical for me.

Please let me know what's wrong with this.

JsonSong89 commented 2 years ago

I have the same problem , and few days ago ,it works fine . I can't fetch any significative infomation from this error message .

night-fury-web commented 2 years ago

@Adrian-T-AMZN @LindaNC Would you check this issue?

kdfhhao commented 2 years ago

When I use the order number to update the order status, the following problem occurs. When the same code is accessed normally in North America, the following error is reported in Europe, which is completely nonsensical. 404 bad request. Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit.

ouzhiman commented 2 years ago

I have the same problem, it started on July 17th, what should I do?

kdfhhao commented 2 years ago

I have the same problem, it started on July 17th, what should I do?

Since July 17, Amazon has removed the PII permission of MWS. It is estimated that this has caused a bug, and we can only wait for Amazon to fix it.

kevinvenclovas commented 2 years ago

Same issue -.-

night-fury-web commented 2 years ago

I have the same problem, it started on July 17th, what should I do?

Since July 17, Amazon has removed the PII permission of MWS. It is estimated that this has caused a bug, and we can only wait for Amazon to fix it.

I can get PII data using MWS API.

kdfhhao commented 2 years ago

I have the same problem, it started on July 17th, what should I do?

Since July 17, Amazon has removed the PII permission of MWS. It is estimated that this has caused a bug, and we can only wait for Amazon to fix it.

I can get PII data using MWS API.

mws to spapi

Cyniade commented 2 years ago

I have the same problem, it started on July 17th, what should I do?

Since July 17, Amazon has removed the PII permission of MWS. It is estimated that this has caused a bug, and we can only wait for Amazon to fix it.

Do you have an official statement of this ?

kdfhhao commented 2 years ago

There is no official statement. I guess the official bug needs to contact the official for confirmation.

在 2022年7月19日,18:05,Lucas Noffray @.***> 写道:

 I have the same problem, it started on July 17th, what should I do?

Since July 17, Amazon has removed the PII permission of MWS. It is estimated that this has caused a bug, and we can only wait for Amazon to fix it.

Do you have an official statement of this ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

tonygalluscio commented 2 years ago

Message from Amazon Developer Support:

I understand your RDT calls have been recently failing with a " Size of a request header field exceeds server limit." error. This is a known issue, affecting a portion of RDT calls for EU sellers. Our Technical team is currently working to address this, and I will notify you when they are finished. The impact should already be reduced from when it was first identified.

Johnny99211 commented 2 years ago

Seems to work for me again!

night-fury-web commented 2 years ago

It works for me too! Will close this issue tomorrow after checking again.

omidnoorani commented 2 years ago

We are having the same exact problem. It is still not working for us. Anyone has any updates on this issue? Thank

Johnny99211 commented 2 years ago

@omidnoorani are you using a second API for that? I'm for example using https://github.com/jlevers/selling-partner-api and needed to upgrade to v5.1.1 since something changed dramatically inside the requests. With an older version it still dont works. Maybe this info helps.

omidnoorani commented 2 years ago

It started working for us around 12:14p PT (a few minutes before I posted here). @Johnny99211 -- We were on the latest version of the SDK already. Thanks for the suggestion.

graedwin commented 2 years ago

Hello!

We recently deployed a fixed for this issue. Feel free to contact us again for any questions but we were able to confirm that there are no more errors.

Javier Villalobos Amazon - SP API Site Reliability Engineer

Philomath88 commented 1 year ago

@graedwin We recently got approved for the RDT but when I call for a RDT:

`async function getRestrictedToken() { try { const response = await sellingPartner.callAPI({ operation: 'tokens.createRestrictedDataToken', endpoint: 'tokens', body: { restrictedResources: [ { method: 'GET', path: '/reports', // You need to replace this placeholder dataElements: ['TransactionID'] // You need to replace this placeholder } ] }, version: '2021-06-30' });

if (response && response.restrictedDataToken) {
  console.log('restrictedDataToken: ', response.restrictedDataToken);  // Corrected a typo here: 'reponse' -> 'response'
  return response.restrictedDataToken;
} else {
  throw new Error('Restricted data token not found in response');
}

} catch (error) { console.error('Failed to obtain restricted token:', error); throw error; } }`

I get this error:

Failed to obtain restricted token: CustomError: Application does not have access to one or more requested data elements: [TransactionID] at SellingPartner.callAPI (/Users/maximiliandoelle/Projects/selling/node_modules/amazon-sp-api/lib/SellingPartner.js:705:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async getRestrictedToken (/Users/maximiliandoelle/Projects/selling/modules/createReport.js:289:22) { code: 'InvalidInput', details: '', type: 'error' } node:internal/process/promises:288 triggerUncaughtException(err, true / fromPromise /); ^

CustomError: Application does not have access to one or more requested data elements: [TransactionID] at SellingPartner.callAPI (/Users/maximiliandoelle/Projects/selling/node_modules/amazon-sp-api/lib/SellingPartner.js:705:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async getRestrictedToken (/Users/maximiliandoelle/Projects/selling/modules/createReport.js:289:22) { code: 'InvalidInput', details: '', type: 'error' }

I have rotated the secret since rotation as well as reauthorised the app

Philomath88 commented 1 year ago

@graedwin We also got recently approved for the RDT but can't access restricted values... Could you check whether we truly have access? The Amazon dev support (ticket) is not being helpful...