question

MarBan avatar image
MarBan asked

Connect to api to add product to the store and download orders

Hi,

How to connect to api to add product to the store and download orders.

Can you give an example in C # and explain from where to get the appropriate data to enter.

I found an example but I don't know if it's good


LWAAuthorizationCredentials lwaAuthorizationCredentials = new LWAAuthorizationCredentials

{


ClientId = "amzn1.application-oa2-client.40d6b012b6d7407ab8bd0ba14e02149f",

ClientSecret = "9cd9317868b1acedab3012d18d24d9569fc6f8650f3b737671be47fd6263ce8a",

RefreshToken = "???",

Endpoint = new Uri("https://api.amazon.com/auth/o2/token")

};

RestClient client = new RestClient("https://sellingpartnerapi-na.amazon.com");



RestRequest request = new RestRequest("/orders/v0/orders", Method.GET);

request.AddQueryParameter("MarketplaceIds", "?????");

request.AddQueryParameter("CreatedAfter", "2020-12-01T00:00:00Z");

LWAAuthorizationSigner auth = new LWAAuthorizationSigner(lwaAuthorizationCredentials);

auth.Sign(request);


AWSAuthenticationCredentials aws = new AWSAuthenticationCredentials();



aws.AccessKeyId = "???";

aws.SecretKey = "??";

aws.Region = "us-east-2";

AWSSigV4Signer signer = new AWSSigV4Signer(aws);

signer.Sign(request, client.BaseUrl.Host);


var resp = client.Execute(request);

Console.WriteLine(resp.StatusCode);

Console.WriteLine(resp.Content);


where can I find - RefreshToken, AccessKeyId, SecretKey,MarketplaceIds

I have access to a reseller account and developer account but I cannot find this information


I have a similar report


api
10 |5000

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

0 Answers