POST v1/cases/screeningRequest
Hi
Receiving a 401 Unauthorised response on POST v1/cases/screeningRequest. I've successfully completed the request from POSTMAN, copied the date from the request and pasted into code to ensure request and signature generation are the same.
Please see requests below. This has been used only as a comparison :
//code
(request-target): post /v1/cases/screeningRequest host: rms-world-check-one-api-pilot.thomsonreuters.com date: Fri, 30 Aug 2019 08:57:10 GMT content-type: application/json content-length: 190 { "groupId":"0a3687cf-6c28-1107-9b0a-4d0000000141", "entityType": "INDIVIDUAL", "providerTypes": [ "WATCHLIST" ], "name": "putin", "secondaryFields":[], "customFields":[] }
Signature keyId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="YG7EWwddhf0vw3KmVH3Bp35kks85O9k0LtkyCDlcHlU="
//postman
(request-target): post /v1/cases/screeningRequest host: rms-world-check-one-api-pilot.thomsonreuters.com date: Fri, 30 Aug 2019 08:57:10 GMT content-type: application/json content-length: 190 { "groupId":"0a3687cf-6c28-1107-9b0a-4d0000000141", "entityType": "INDIVIDUAL", "providerTypes": [ "WATCHLIST" ], "name": "putin", "secondaryFields":[], "customFields":[] }
Signature keyId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="YG7EWwddhf0vw3KmVH3Bp35kks85O9k0LtkyCDlcHlU="
Based on the code above, the only value that changes when i send my request is the date. Copying the date between postman and code and modifying it by a minute yield the same result
Best Answer
-
Finally found the issue, based on the request object having specific spaces in the content, turns out you cannot just serialize the content object into a json string and pass that through into the body. You literally have to build a string and pass that through. This is a rather unique solution
0
Answers
-
Just an additional point. I have the following 3 API calls working :
- /v1/groups
- /v1/groups/{groupId}/caseTemplate
- /v1/reference/countries
0 -
Can you please provide me the below information so that I can investigate. Please send this is an attachment so that the format, indentation and spaces do not vary.
1. The output of the DataToSign Variable.
2. Authorization headers.
3. Date header value:
4. The complete URL that you are sending your request to.
Also, can you please provide the request headers and the response headers?
0 -
It seems that your GET requests are being sent correctly. The issue is with the POST requests.
0 -
As you have stated that you are able to send your GET requests correctly, can you please confirm if you are sending content-length and its value and content-type and its value as HTTP headers along with the other HTTP headers.
The format would be as follow:
Content-Length: "453" #the value would depend on the length of the content/payload
Content-Type: "application/json"
0 -
@Irfan.Khan : Please find attached as requested
0 -
@Irfan.Khan, any feedback on the above request?
0 -
@Irfan.Khan, any feedback on the above request?
0 -
attachment has been removed
0 -
Please! Can you share the solution?
I have the same error and I made the same test that you and the same comparison.
Thanks!
0 -
@_IT_Innovacion Can you please raise a separate question on dev com Q&A so that I can assist you?
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 中文论坛