Object reference not set to an instance of an object #41
-
Hello, I try to use the package to get orders, but it throws an error: Object reference not set to an instance of an object on line of code: AmazonConnection amazonConnection = new AmazonConnection(credential); I passed all my credentials (trimmed for security reason) below: AmazonCredential credential = new AmazonCredential() Stack trace: Could you please advise? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi Ihorkolucky, Should be and easy fix. Just add market reference to the the credentials object: AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential() |
Beta Was this translation helpful? Give feedback.
Hi Ihorkolucky,
Should be and easy fix. Just add market reference to the the credentials object:
AmazonConnection amazonConnection = new AmazonConnection(new AmazonCredential()
{
AccessKey = ";alsdkjf;lsd",
SecretKey = "e/;alsdkjf;alsdjk",
RoleArn = "arn:aws:iam::;lasdjkf;aldsjk:role/;lasdjkf;aldkj",
ClientId = "amzn1.application-oa2-client.l;asjdf;ladsjk",
ClientSecret = ";alsdjf;ldsjkf",
RefreshToken = "Atzr|;alskd;lasdkj",
MarketPlace = MarketPlace.US
});