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

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
Accepted
35 10 16 20

Please could I ask a question with regards the WC1 API and the characters it accepts.

Please could I ask a question with regards the WC1 API and the characters it accepts.

Basically, we are running a few tests and I’m getting the following error for some entities/clients that we are trying to upload:

Unauthorized : The request has failed an authorisation check. This can happen for a variety of reasons, such as an invalid or expired API key, an invalid HMAC signature or a request timing issue/problem with the Date header value. The API client should ensure a correctly synchronised clock is used to generate request timestamps.

I have noticed that the name(s) of these entities/clients contain unicode characters.

If I were to amend these names not to include the characters they work OK.

I just wanted to check if the WC1 API accepts such characters.

John
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.

1 Answer

Upvotes
Accepted
211 1 0 0

Hi @John Williams,

You need to be very careful when using Unicode characters to make sure the contentLength is correct in the signed data.

If you look at the pre-requisite script for the cases call in PostMan (SEQ-2b or SEQ 2c) you’ll see it uses the following code to get the content length.

var contentLength = unescape(encodeURIComponent(content)).length;

If the length value is wrong, then the authorisation will fail.

Regards,

Rodney

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