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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
32 7 8 12

World Check One API Case Screening 401 Unauthorized

@Irfan.Khan

I used the code provided by you, but still getting

here are the details.

postData
{"secondaryFields":[],"entityType":"INDIVIDUAL","customFields":[],"groupId":"0a3687d0-64a6-1d01-9945-119200000daf","providerTypes":["WATCHLIST"],"name":"乔治布什"}
dataToSign
(request-target): post /v1/cases
host: rms-world-check-one-api-pilot.thomsonreuters.com
date: Mon, 13 Aug 2018 09:32:37 GMT
content-type: application/json
content-length: 167
{"secondaryFields":[],"entityType":"INDIVIDUAL","customFields":[],"groupId":"0a3687d0-64a6-1d01-9945-119200000daf","providerTypes":["WATCHLIST"],"name":"乔治布什"}

HMAC
m7d1qURe1oYPHgxcQTekDaL/zJugJu6l27nHd5kjxfg=

Authorization

Signature keyId="xxxxxx",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="m7d1qURe1oYPHgxcQTekDaL/zJugJu6l27nHd5kjxfg="

System.Net.WebException: 'The remote server returned an error: (401) Unauthorized.'

-------------------------------------------------------------------------------------------

POSTMAN with same Timestamp
var client = new RestClient("https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/cases/screeningRequest");
var request = new RestRequest(Method.POST);
request.AddHeader("Postman-Token", "f52a3f50-aa98-4b20-b4fa-b2c64586a680");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Content-Length", "152");
request.AddHeader("Authorization", "Signature keyId=\"xxxxx\",algorithm=\"hmac-sha256\",headers=\"(request-target) host date content-type content-length\",signature=\"zP6AqFE7AduYbTPPFta9mQYLzWcaNwUJ4/jK/jpduDc=\"");
request.AddHeader("Date", "Mon, 13 Aug 2018 09:32:37 GMT");
request.AddParameter("undefined", "{\n \"groupId\":\"0a3687d0-64a6-1d01-9945-119200000daf\",\n \"entityType\": \"INDIVIDUAL\",\n \"providerTypes\": [\n \"WATCHLIST\"\n ],\n \"name\": \"乔治布什\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

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

Upvotes
Accepted
4.2k 8 5 6

@ziad.abourizk

Can you please confirm the API call you are making so that I can assist you?

I see you are trying to save a case (API call- SEQ-2c: Save a case: Individual) when using your C# code, but see you are calling the API request -"SEQ-4a: Screen a case" in the Postman console.

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.

Thanks, its working now.

@ziad.abourizk

Thank you for the update.

I am pasting the link of the post where the issue was resolved so that it can be helpful for other users too.

Upvotes
4.2k 8 5 6
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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.