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: ""

Best Answer

  • 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

Answers

  • Masked the API credentials.

  • @INikolaidis,

    Thank you for your query.

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

  • Sure, thanks in advance

    Request Body


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

  • @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.

  • 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

  • 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: ""

  • @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.

  • @INikolaidis,

    Thank you for the update and the confirmation.