For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
18 1 1 4

401 Authentication Error

Hi,

The APIs have been working fine a few days ago, but today we are suddenly getting 401 Unauthorised on all API calls via postman and also dot net. We even tried regenerating the api key and secret, again imported the api collection and environment and added the new key and secret, but we are still getting 401 un-authorised.

Could you please help us with this? Thank you.

Below is a raw of my Postman Console:

GET /v2/reference/countries HTTP/1.1
Date: Mon, 14 Mar 2022 22:28:19 GMT
Authorization: Signature keyId="540a9335-98da-41c8-9fe3-e2b17dbd0272",algorithm="hmac-sha256",headers="(request-target) host date",signature="X2YF4zagVg9tlWztCZGGZMni/oBRJKtZ7jHClYmrSwo="
User-Agent: PostmanRuntime/7.29.0
Accept: */*
Postman-Token: c8dedaf1-8298-4722-95cd-62946cfc1b0a
Host: api-worldcheck.refinitiv.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
 
HTTP/1.1 401 Unauthorized
Date: Mon, 14 Mar 2022 22:26:48 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"
 
world-check-oneerror-401
icon clock
10 |1500

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

Upvotes
Accepted
984 5 1 5

Hi @subarik, Thank you for reaching out to us!

You get the 401 error when the request has failed an authorization check. This can happen for a variety of reasons, such as an invalid or expired API key, an invalid HMAC signature or a request timing issue/problem with the Date header value. The API client should ensure a correctly synchronized clock is used to generate request timestamps.


However, Based on the Postman Console you shared with us, it seems that there is difference (~120) between the request header timestamp and the response header time stamp which basically mean the clock is not synchronized. Could you please adjust the system clock as per NTP and the server response having the time difference of not more than 30 seconds and then try again?

Please feel free to reach out for any further assistance.

icon clock
10 |1500

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

Hi @anisetti.saikiranreddy01 I'm currently in Cambodia and tried to send the API request to WC1 server via our local PC, we found that the time response from your server is different 5h from us. May I know how to change that system clock? Note: we used Window 10 and Java Spring to call ur API and our time is correct UTC+7

Hi @senate,


Thanks for reaching out to us!

You can take help of your internal network admin team to synchronize your system clock to NTP server to get the API calls successful

Upvote
18 1 1 4

Thanks for the quick response. It really was my system clock at fault, I synced it with the NTP and its working fine now. Thanks.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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