...aracters.
The screening request is successful if the name has no special characters in it.
The entity name for which I received a 401 error is "Böhnke Luckau GmbH"
@Irfan.Khan
You can avoid the issue byencoding the request payload as ‘utf-8’ and then use it to calculate thecontent length of the payload.
This is mandatory if the user istrying to screen names with special characters. This is done to properlycalculate the content byte length and not the string length.
As per my understanding, it’sthe length of the content/payload sent to the API which determines that therequest will succeed or not, if your request contains special characters.
Also, when the payload is beingsent in the request, it has to be sent as UTF-8 encoded.
Please find the simplifiedsteps to achieve the same below:
1. The content body should beconverted to UTF-8.
2. Calculate the length of theUTF-8 encoded content. Putting it simply, the length of UTF-8 encoded contentis different than the normal payload body.
3. Use the normalpayload/content body in the dataToSign variable.
4. Use the content length of theUTF-8 encoded in the dataToSign variable.
5. Send the UTF-8 encodedcontent/payload in the API request.
6. Send the content length ofthe UTF-8 encoded in the request header.
I advise you to send the samerequest using Postman. If it is successful, check the authorization headers andthe content length in it and make sure the authorization header and the contentlength you are sending via your code is also the same. This should give you asuccess response.
Please do not include“charset”=UTF-8 as headers while sending your request, this will not solve theproblem. We do not expect the charset in the request and hence it will resultin error.
Let me know if this helps insolving your issue and feel free to reach out.