403 CloudFront

Common error caused by GET requests with an empty request body.

Question: Why am I getting a 403 "The request could not be satisfied" error from CloudFront? Answer: After our migration to CloudFront, GET requests with an empty request body will be rejected with a 403 error (while previously accepted). Using curl as an example, remove the -d '{}' or any empty payload from your GET requests. GET requests should not include a request body. Example:

This will not work:

curl -X GET -H "PF-API-KEY: your-api-key" -H "Content-Type: application/json" -d '{}' "https://api.pacifica.fi/api/v1/positions?account=..."

This will work:

curl -X GET -H "PF-API-KEY: your-api-key" "https://api.pacifica.fi/api/v1/positions?account=..."

Last updated