I am trying to call WC1 /v2/refences/countries API from CSharp from Windows environment.
The response is 401 unauthorised. pls guide me where things are going wrong. thank you!
Hi @ashwinikumar.
My initial assessment is that Date should be generated as GMT instead of manually adding GMT to the string. This could be the cause of the 401 error. I have also attached the C# code for authorization provided by World-Check for your reference - csharp.zip. This may help to solve this error. Thank you.
Regards,
Ssneha Balasubramanian.
I am looking into this and will get back to you with a solution as soon as possible. Thank you.
Actually I did few changes and every time I am getting the same response.
WC1 API response.zip
here is the response file @ssneha.balasubramanian
Can you also post the code of GenerateAuthHeaders() function? Thanks.
it's the same file which you shared to me in the 3rd last comment.
here it is! @ssneha.balasubramanian
AuthHeadersBuilder.zip
Can you send me your email id? Thanks.
@ssneha.balasubramanian
I appreciate your help, now it's working!