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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
1 1 0 0

401 Unauthorized when calling /groups with GET (using RestTemplate) for World Check API

Please find the request details :

We are using RestTemplate as Java Client

dataToSign:

(request-target): get /v1/groups
host: rms-world-check-one-api-pilot.thomsonreuters.com
date: Mon, 09 Sep 2019 08:13:42 GMT

Hmac : MRdjL0i+Rj/gNsX9LjLfraF5B1ztnbPArtqL/ZuyYdU=

authorisation :
Signature keyId="XXX",algorithm="hmac-sha256",headers="(request-target) host date",signature="MRdjL0i+Rj/gNsX9LjLfraF5B1ztnbPArtqL/ZuyYdU="

XXX=Api Key


13:43:46.924 [main] DEBUG org.springframework.web.client.RestTemplate - HTTP GET https://rms-world-check-one-api-pilot.thomsonreuters.com/v1/groups
13:43:46.988 [main] DEBUG org.springframework.web.client.RestTemplate - Accept=[text/plain, application/json, application/*+json, */*]
13:43:48.631 [main] DEBUG org.springframework.web.client.RestTemplate - Response 401 UNAUTHORIZED


Note : Its working using post man collection correctly

world-checkworld-check-oneerror-401
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
4.2k 7 5 6

@samiran.paul

Request you to provide us the WC1 account name so that I can assist you.

Also, can you please copy the date header value that is getting generated by your code and paste it in the pre request script of your Postman in the date variable, as shown below:

var date = "Mon, 09 Sep 2019 08:13:42 GMT" and try requesting the API using Postman. Obviously, the API call will get a 401 this time as the time stamp has expired, but the idea is to check if the HMAC generated by Postman is same as the one generated by your code.

If HMAC is correct, please provide me the request headers and response headers of the API call so that I can investigate.

icon clock
10 |1500

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

@samiran.paul

Following up to see if there is an update on this.

Click below to post an Idea Post Idea