![]() RestRequest.AddParameter("CreatedAfter", (-5).ToString("yyyy-MM-dd"), ParameterType.QueryString) RestRequest.AddParameter("MarketplaceIds", MARKETPLACE_ID, ParameterType.QueryString) Static string MARKETPLACE_ID = "ATVPDKIKX0DER" // for US. The hashed string to sign should be correct as the string is correct!? ![]() The marketplace id and date seems to be mixed around? The Canonical String for this request should have been I've done a lot of diagnostics and I can see the problem - ish!ĬreatedAfter=&MarketplaceIds=A1F83G8C2ARO7P Hopefully it doesn't take 60 days for them to respond this time. I will open a case with Amazon and see what they say. Went from getting an error about sig not matching to just forbidden. I did make sure to use the Role ARN in the app. I am guessing our issue is with some IAM policy or ARN somewhere. The URL I used is the API end point for that call. When you buy our products on Amazon it is sold under the Amazon name. We are a Direct Fulfillment vendor with Amazon. So I think there is something wrong with your request parameters.Ĭan you also let me know where this (/vendor/directFulfillment/orders/v1/purchaseOrders) endpoint? I never used it before First I tried it with my credentials for this endpoint (/vendor/directFulfillment/orders/v1/purchaseOrders) and I also got Forbidden, then I tried to hit this endpoint Threading namespace amazon_df_scratchpad SellingPartnerAPIAA using RestSharp using System using System. Var response = client.Execute(restRequest) RestRequest = SignWithSTSKeysAndSecurityTokenn(restRequest,, credentials.RoleARN, credentials.AWSKey, credentials.AWSSecret, overrideHost) RestRequest = SignWithAccessToken(restRequest, credentials.ClientId, credentials.ClientSecret, credentials.RefreshToken) Then call these functions to sign your request Return new AWSSigV4Signer(awsAuthenticationCredentials)Ĭreate some class like that and fill it wit your info RestRequest.AddHeader("x-amz-security-token", ) Var awsAuthenticationCredentials = new AWSAuthenticationCredentialsĪccessKeyId = , Response1 = STSClient.AssumeRoleAsync(req, new CancellationToken()).Result IRestRequest restRequest = new RestRequest(resource, Method.GET) Step 4: Add new console app and then add Amazon.SellingPartnerAPIAA to console app I am still in learning and wanted to share my experience IMPORTANT NOTE: These are R&D examples/codes and code, and there is no guarantee that it will work for you or anybody else. Step 2: Make sure you download the credentials of the user (AWS key and secret) you created in above documentation and click Generate Token to get your refresh token. Step 1: Make sure you self auth your app in seller central. Not sure you have went through this process to create your application:Īfter your are done with above, then you can follow these steps for getting your orders:
0 Comments
Leave a Reply. |