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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
1 1 0 4

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 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
2.4k 5 5 5

@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 5.0 MiB each and 10.0 MiB total.

Upvotes
1 1 0 4

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 5.0 MiB each and 10.0 MiB total.

Upvotes
2.4k 5 5 5

@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 5.0 MiB each and 10.0 MiB total.

Upvotes
1 1 0 4

It does not work with Postman also.

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

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea