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"
Best Answer
-
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.
2
Answers
-
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.
1 -
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
0 -
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
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛