PHP curl call from localhost return UNAUTHENTICATED_API_CALL

Hi, I’m trying to call PHP Curl on https://sandboxapi.rapyd.net/v1/data/countries from my localhost setup and it results in

{"status":{"error_code":"UNAUTHENTICATED_API_CALL","status":"ERROR","message":"The API received a request, but the signature did not match. The request was rejected. Corrective action: (1) Remove all whitespace that is not inside a string. (2) Remove trailing zeroes and decimal points, or wrap numbers in a string.","response_code":"UNAUTHENTICATED_API_CALL","operation_id":"c32c567d-691d-41df-81ac-b05f4e0b2eaa"}}

I have activated sandbox and using correct credentials, but this still getting this response.
I think it related to SSL, because it works on live server.

Thanks

Thanks @manoj, I know for when you use localhost for certain complete, cancel and error urls in the parameters, you will have to use ngrok.

https://community.rapyd.net/t/complete-cancel-and-error-urls

However this may be an issue due to the signature request.

From the error response, this may be due to a couple things:

  1. All spaces and other whitespace outside of strings must be removed.
  2. Numbers should be sent in strings, not as integers/numbers.

Here are some resources that may help:

I would also take a look around your body and and how it may not be parsed correctly.