World-Check-One API Authorisation using C#

Hello,
Does anyone have any code snippets for performing API Authorisation using C# and the Built-in HttpClient classes?
I have tried an implementation based on the Postman examples, but all I am getting via my calls is a 401, while the equivilant in Postman works perfectly fine.
Best Answer
-
Hello @john.crocker
thank
you for the data. As we discussed the sample data you've provided looks
correct. The only problem was with value of the signature.
Easiest way to test it is to:
- comment dateToSign variable in Postman pre-request script
- create new variable using the data generated by your code, i.e.
var dateToSign = "(request-target): get
/v1/reference/countries\nhost:
rms-world-check-one-api-pilot.thomsonreuters.com\ndate: Mon, 26 Sep 2016
15:36:42 GMT";
- send the request using postman
- compare your signature with signature generated by the code
From my experience algorithm to generate signature should looks like:
- encode secret to sequence of bytes
- encode message to sequence of bytes
- create new instance of the HMACSHA256 class using the encoded secret
- compute hash from the encoded message
- convert result to base 64 string
In the internet you can find many examples of the algorithm in the different programming languages.0
Answers
-
Hi Everyone - if I crack it in the meantime I will post a code snippet for anyone interested if that's ok?
0 -
Hello @john.crocker
would you be able to provide:
- example of string you use in your hmac function (in postman it's called DataToSign) i.e.
(request-target): post /v1/groups
host: rms-world-check-one-api-pilot.thomsonreuters.com
date: Tue, 07 Jun 2016 20:51:35 GMT- all headers that are in your https requests (Host, Date, Authorization)?
0 -
Hi Kamil
Will email full info seperate as it contains our API key
0 -
Is there any code samples being written for using the API?
0 -
I need to know about how can I make a request to the World-check one API. Can you please provide me the link for the sample code?
0 -
Hi Guys,
I have a client looking for the same answer to this last question from @krunal.b.patel
Can you please post some info on how this progressed?
Many thanks
Vanessa
0 -
I posted Java, C#, and node.js in CODE EXAMPLES under DOWNLOADS
Brian
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.5K 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
- 560 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
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 724 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 中文论坛