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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
36 1 0 0

Authorization Error on POST

Although I’m able to execute GET requests without any issue, I get a 401 Unauthorized error on POST requests (e.g create simple case).

I have followed the instructions on the documentation to create a simple case, meaning I got the top level groups first and updated the group-id on the postman environment.

Keep in mind that I’m using the API key and secret of the Pilot environment.

I'm attaching the request/response headers from the postman console

Request Headers

Date: Mon, 31 Aug 2020 07:41:21 GMT

Content-Type: application/json

Authorization: Signature keyId="XXXXXXXXXXXXXXXXXXXXXXXXX",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="PibvdrlXE0eyfVZ5XwhlI9g86ksQwaCLV2KlEeu5dqc="

Content-Length: 200

User-Agent: PostmanRuntime/7.26.3

Accept: */*

Cache-Control: no-cache

Postman-Token: 5c237e7d-5a46-4863-a1ad-85af386bffdb

Host: rms-world-check-one-api-pilot.thomsonreuters.com

Accept-Encoding: gzip, deflate, br

Connection: keep-alive


Response Headers

Strict-Transport-Security: max-age=15552000, includeSubdomains

Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"

Transfer-Encoding: chunked

Date: Mon, 31 Aug 2020 07:41:21 GMT

Server: ""

world-checkworld-check-oneauthenticationpost
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.

Masked the API credentials.

Upvote
Accepted
36 1 0 0

Hi Prabhjyot.Mandla , apparently the problem was caused by an outdated environment while the api version is 2.2

Now it is resolved!

Thank you

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.

@INikolaidis,

Thank you for the update and the confirmation.

Upvotes
4.5k 4 7 8

@INikolaidis,

Thank you for your query.

Could you please share the request body which you are sending?

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.

Upvotes
36 1 0 0

Sure, thanks in advance

Request Body


{ "secondaryFields": [], "entityType": "INDIVIDUAL", "customFields": [], "groupId": "5nzbfqa0d1z71ex1ivbnh31f1", "providerTypes": [ "WATCHLIST" ], "name": "putin" }

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.

Upvotes
4.5k 4 7 8

@INikolaidis,

Thank you for the payload.

The provided payload has the generates a content length of 164, where as in the request header provided by you, the content length appears to be 200. This possible could be the reason of error 401. Can you please check, if the content length which is being calculated is correct? Also, can you please confirm if you are using postman, where you are getting 401, or any other code.

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.

Upvotes
36 1 0 0

I'm getting the error on postman and by using the sample project of refinitiv world check-one api v2.2. I have followed the exact same instructions as per the website

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.

Can you please share the request and response headers along with the request body, so we may investigate?

Sure, here you go:


Request Headers

Date: Tue, 01 Sep 2020 07:40:16 GMT

Content-Type: application/json

Authorization: Signature keyId="XXXXXXXXXXXXXXXXXXX",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length",signature="L7Qez9liURUN9efsGOop2PYajR5wooSsZP0la9WjimI="

Content-Length: 200

User-Agent: PostmanRuntime/7.26.3

Accept: */*

Cache-Control: no-cache

Postman-Token: 7edf38c0-bdb2-4c8c-9898-6ae340bf9b3e

Host: rms-world-check-one-api-pilot.thomsonreuters.com

Accept-Encoding: gzip, deflate, br

Connection: keep-alive


Request Body

{

"groupId": "5nzbfqa0d1z71ex1ivbnh31f1",

"entityType": "INDIVIDUAL",

"providerTypes": [

"WATCHLIST"

],

"name": "putin",

"secondaryFields": [],

"customFields": []

}


Response Headers

Strict-Transport-Security: max-age=15552000, includeSubdomains

Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"

Transfer-Encoding: chunked

Date: Tue, 01 Sep 2020 07:40:16 GMT

Server: ""

Upvotes
4.5k 4 7 8

@INikolaidis,

Thank you for the details.

I am getting the content length of the payload as 173, where as you are getting 200 for the same payload. If you are getting error via postman, please use jsonlint.com to re-format the payload and try sending the request again using the re-formatted payload. Please check the content length.

Do let us know how it goes.

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.

Click below to post an Idea Post Idea