Closed nightcoding2021 closed 3 years ago
Same issue here, have been asking amazon for help for a month. Please give access to to older mws and in the mean time fix sp api. i do think its intentional
fount this use this . https://github.com/amzn/selling-partner-api-models/issues/1096
The answer for anyone with this problem is use 2021-06-30 version instead - which wasn't yet live when I created post.
I've no idea why Amazon would design it originally with the encryption step, which would obviously be a complete disaster.
File upload now working here using 2021-06-30! :)
@nightcoding2021 Do you have to encrypt or encode the feed data?
I try to use 2021 version with C# but keep having 403 response with The request signature we calculated does not match the signature you provided. Check your key and signing method
But I assume those signature already in the response from createFeedDocument url property which I use for upload base url. Do you have this issue before?
Here is my example
public IRestResponse Upload(Byte[] content, string url)
{
var client = new RestClient(url);
var request = new RestRequest(Method.PUT);
request.AddParameter("text/plain; charset=utf-8", content, ParameterType.RequestBody);
var response = client.Execute(request);
Console.WriteLine(response.Content);
return response;
}
This is getting confusing. Amazon are returning a base64 version of key and IV. I cannot figure out how to present those to an encryption function. The Amazon documentation is totally useless on this point. How do they even want the data uploaded? Base64 encoded or what? It's total guesswork. This is a complete regression from MWS, now we have all these dumb extra steps which are obviously not user friendly at all!
I've been using the below, but something is wrong - the file uploads report The uploaded document has an illegal block size.. The strKey and strIV values below are the same base64 encoded strings the createFeedDocument call returns.
Could someone help correct the below code?