walmartlabs / partnerapi_sdk_dotnet

Walmart Partner API SDK for .NET
Other
15 stars 16 forks source link

Issue with using Test Application #5

Closed ravigosai closed 6 years ago

ravigosai commented 6 years ago

Hello, I am trying to use the sample application as is to see if the API is working or not. I am getting 401 Unauthorized error. I can confirm that Consumer ID and API keys are correct. I am trying to figure out why this wouldn't be working and why I would be getting 401 Unauthorized error.

Any help will be really appreciated.

Thank you!

roman-shuhov commented 6 years ago

Could you please share debug output of any request? (without any creds headers). I believe another good place to address this kind of issues is https://developer.walmart.com/forums/index.php/forums/

ravigosai commented 6 years ago

Hello Roman,

Thank you for the response.

I am getting following error. I have masked all the cred stuff let me know if this makes sense. I will reach out to developer.walmart.com as well but wanted to see if you know if this is common issue.

Thank you!

Request: Method: GET, RequestUri: 'https://marketplace.walmartapis.com/v3/items?limit=10', Version: 1.1, Content: , Headers: { User-Agent: .Net_Walmart.Sdk.Marketplace_v1.0.1.0_HIDDENTEXT WM_SEC.AUTH_SIGNATURE: HIDDENTEXT WM_SEC.TIMESTAMP: 1532399214949 WM_CONSUMER.CHANNEL.TYPE: HIDDENTEXT WM_CONSUMER.ID: HIDDENTEXT WM_SVC.NAME: Walmart Marketplace WM_QOS.CORRELATION_ID: HIDDENTEXT Accept: application/xml }

You can see result below:

Unknown error occured: Network error while connecting to the API

Press any key to continue...

roman-shuhov commented 6 years ago

Sorry for the long response. I finally got time to check this issue.

Hm, this error looks more like Network connectivity issue, in case of invalid credentials you should see something like:

Api exception occured: API Error Occured [401 Unauthorized]
[ERROR] - UNAUTHORIZED.GMP_GATEWAY_API; Unauthorized

I also double checked current version, wasn't able to replicate this issue, it worked with test creds.

Could you please check if you posted the right payload for this issue?