Most probably this error happened because either you are using an API authentication key within your SDK integration, or the payload structure you sent in the request is not in valid JSON format.


In this article you will be going to know about: 


How to investigate the reason that caused this error?


You can investigate the reason for such an error from the "API debug log" by navigating to the Developer’s menu > Testing > API Debug Logs (within your desired profile).



Or you may get the error directly from the response payload sent according to your sent request 


 


Reason #1: Using an API authentication key within SDK integration.

 

This means that the server and the client key you are using in your integration are not for mobile SDKs usage, and you are using API authentication keys instead as shown in the picture:



In this case, you have to switch the key used to the correct one. If you don't have SDK authentication keys, you can always create a new one from the (+) icon. To know more about this please check our How to get my Authentication/Integration/API Keys? solution article.


Reason #2: The request payload structure is not in valid JSON format.

 

This means that the request JSON format is not correct and might be missing a comma, a curly bracket, or other parts of the structure. Please recheck your JSON structure or use a tool that highlights JSON errors such as (https://jsonformatter.org) as shown below and then pass the correct validated JSON payload to our PT2 endpoints