we cannot ger response. we receive ut still got unauthorized 401 status instead of 200..

Best Answer
-
Apologies for the late response.
From the above details, it looks like there is a descrepency in timestamp in the request and response.
Could you please adjust the system time to NTP and use the exact time as in the response headers? Approximately, only 30 seconds of time difference is acceptable for the API to return a successful response code, exceeding that will result in Error 401.
If you are still receiving Error 401, after adjusting the clock, please send us the updated request and response headers to investigate further.
0
Answers
-
we are facing in the beginning { {protocol}}{ {gateway-host}}{ {gateway-url}}groups this method.
log:
requestfunction generateAuthHeader(dataToSign){
var hash = CryptoJS.HmacSHA256(dataToSign,environment["api-secret"]);
pm.globals.set("variable_key", "variable_value");
return hash.toString(CryptoJS.enc.Base64);
}var date = new Date().toGMTString();
var dataToSign = "(request-target): get " + environment["gateway-url"] + "groups\n" +
"host: " + environment["gateway-host"] + "\n" +
"date: " + date;
var hmac = generateAuthHeader(dataToSign);
var authorisation = "Signature keyId=\"" + environment["api-key"] + "\",algorithm=\"hmac-sha256\",headers=\"(request-target) host date\",signature=\"" + hmac + "\"";postman.setEnvironmentVariable("authorisation",authorisation);
postman.setEnvironmentVariable("currentDate",date);Response
Status code is 200 | AssertionError: expected response to have status code 200 but got 401
Could retrieve the groupId from response | AssertionError: expected response body to be a valid json but got error No data, empty input at 1:1
0 -
Thank you for sharing the pre-request script.
We would need the request and the response headers which can be obtained from the console logs of the postman.
Please use the shortcut CRTL + ALT + C to open the console logs window and then fire the API call using postman. You will get the request and the response headers in the console logs.
Please share those details masking the API key, so that we may investigate on the issue.
0 -
https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/groups
11:06:25.327
Request Headers:
Date:"Tue, 24 Sep 2019 05:21:25 GMT"
Authorization:"Signature keyId="************************************",algorithm="hmac-sha256",headers="(request-target) host date",signature="21AIQT+TVxVWtBFWybQPCHa72RBv4qkOinRuctaaeu8=""
User-Agent:"PostmanRuntime/7.17.1"
Accept:"*/*"
Cache-Control:"no-cache"
Postman-Token:"57335503-be78-4cd0-9f96-083e3f161711"
Host:"rms-world-check-one-api-pilot.thomsonreuters.com"
Accept-Encoding:"gzip, deflate"
Connection:"keep-alive"
Response Headers:
X-Application-Context:"application"
Authorization:"WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"
Transfer-Encoding:"chunked"
Date:"Tue, 24 Sep 2019 05:19:57 GMT"
Server:""""
Response Body:
401
4730 ms
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 719 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛