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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
1 1 1 2

Calling API from C#

I am using following code.

string URL = "https://rms-world-check-one-api-pilot.thomsonreuters.com/api-gateway-service-rest/api/v1/groups";

System.Net.Http.HttpClient client = new System.Net.Http.HttpClient();
client.BaseAddress = new System.Uri(URL);
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("basic", authorisation); //Used from Postman Environment
client.DefaultRequestHeaders.Date = dToday; //Used from Postman Environment

System.Net.Http.HttpContent content = new StringContent("", UTF8Encoding.UTF8, "application/json"); //Since there are no parameters to send
HttpResponseMessage messge = client.PostAsync(URL, content).Result;

But I am always getting 401 Unauthorized error. I also tried creating "authorisation" string in .NET by using .NET HMAC libraries, still no luck.

Any help will be appreciated much.

world-checkworld-check-onec#authentication
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.

1 Answer

Upvotes
Accepted
3.1k 18 7 7

Hi @AviBhate,

I added World Check One and API to tags as it appears you are using the World Check One API... as this question should be posted there.

You reference Postman, do you have the latest World Check One - Postman Collection (Oct 4) loaded into you're Postman ?

Are you able to run SEQ-1a successfully?

Brian

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.