@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);