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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
1 2 1 5

SEQ-screen-sync-simple: Perform Synchronous Screening: Simple 401 Unauthorized.

We are sending "name" parameter in the request as "Rajiv D'silva" but the request is not validated and the response is 401 Unauthorized.

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

@ashish22

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@ashish22

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

Upvotes
Accepted
2.4k 6 5 6

@ashish22

401 error occurs because the request has failed an authorization check. This can happen for a variety of reasons, such as

a) An invalid or expired API key,

b)An invalid HMAC signature.

c) Request timing issue/problem with the Date header value. The API client should ensure a correctly synchronized clock is used to generate request timestamps.

d)Incorrect JSON payload formation at the customer’s end that can cause them to observe 401 response.

Can you please share the complete request and response so that i can investigate this further?

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
1 2 1 5

We are getting 401 only if the name parameter in the request contains apostrophe e.g. Rajiv D'silva. But if the name parameter is Rajiv Dsilva without apostrophe then the response is 200. Is there any validation on the name parameter for special characters?

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
2.4k 6 5 6

@ashish22

Does it work when you pass using postman?

Yes, for special characters you need to pass the request payload by

a. encoding the request payload as ‘UTF-8’ and then use it to calculate the content length of the payload.

b.This is mandatory if you are trying to screen names with special characters. This is done to properly calculate the content byte length and not the string length.

c.It’s the length of the content/payload sent to the API which determines that the request will succeed or not if your request contains special characters. Also, when the payload is being sent in the request, it has to be sent as UTF-8 encoded.

Let me know if this helps.

Regards

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
1 2 1 5

It does not work with Postman also.

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
2.4k 6 5 6

@ashish22

Can you turn on the postman console logs by clicking Alt+Ctrl+C on postman and send the request and send me the complete request and response ?

Also, about UTF-8 ecoding can you implement that and retry the request ?

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.