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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
28 3 4 9

401 when calling get groups

Hi,

I am not sure what I have set up wrong, I can't do a get groups request from C#. I am able to do lots of different requests and they are all working (using static groupId) through C#. I can execute SEQ-pre-groups in Native Postman without any issue.

I am getting error "Returned The underlying connection was closed: An unexpected error occurred on a send"

dataToSign:

(request-target): get /v2/groups

host: api-worldcheck.refinitiv.com

date: Tue, 25 Jan 2022 23:46:53 GMT


hmac:

SZV1NYhX8FclvsJ12P+WuZzpvLZfmn9Qz7FPnX4ihmg=


authorisation:

Signature keyId="76488866-b414-499d-a4f4-628e7bf03857",algorithm="hmac-sha256",headers="(request-target) host date",signature="SZV1NYhX8FclvsJ12P+WuZzpvLZfmn9Qz7FPnX4ihmg="


requestEndPoint:

https://api-worldcheck.refinitiv.com/v2/groups


I used Postman to check my hmac with the provided time in C# code, it is correct. I have checked my time against https://time.is/, it is also exact. I have checked every single letter against postman pre-request Script but I can't find any mistake.

Do you see what is wrong with my C# request?

Thanks,
Cady

worldcheck-one-api
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
1.3k 4 1 2

Hi @cadyh ,


Please try the code sample that I have sent via email and let me know if that works, it has the latest endpoint details updated on the code.


If you still face issues we can get on a quick call and take a look at it.

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.

Hi Mehran,

The issue is solved. Your code sample showed the error of secured channel that I didn't set before calling groups API (it was set for other API calls)

Thanks,

Cady

Upvotes
1.3k 4 1 2

@cadyh

Have you tried referring to the code examples that we have on our developer's forum, just to compare the codes?

You can download using the below link:

https://developers.refinitiv.com/en/api-catalog/customer-and-third-party-screening/world-check-one-api/downloads

I am also mailing you to C# code examples for 'get groupId' which we have executed and tested, please use that as a reference to compare it with your code and try and execute the code example and see if it works?

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
28 3 4 9

Hi Mehran,

I have downloaded the sample c# code and ran it after updating the apikey, apisecret, gatewayurl, gatewayhost. I still get the same error "Returned The underlying connection was closed: An unexpected error occurred on a send".

This sample code should be updated, the URL and host is outdated.

Cady

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.