planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

Giving Api returning CloudFront response from certain clients (postman) #1208

Closed localpath closed 1 month ago

localpath commented 1 month ago

Affected Product Which product does this bug affect? Giving

Describe the bug Using a tool like postman to build some new integrations we've started seeing a strange CloudFront response from the Api. Seems strange that we're getting a response from the CDN and not an Api server? Is it filtering of a WAF or Api Gateway redirecting certain clients to CloudFront instead of routing to the Api server?

Other endpoints work just fine from Postman for instance.

Seems strange but is this some obfuscation or is it really a cloudfront response for an Api endpoint?

To Reproduce

GET -> https://api.planningcenteronline.com/giving/v2/donations/180178588 403 Response from CloudFront Expected behavior Api response with some resource

Screenshots

Screenshot 2024-07-09 164309

Additional Context: Screenshot 2024-07-09 164421

Endpoint: https://api.planningcenteronline.com/giving/v2/donations/180178588 Language: Node / Postman Authentication: Oauth2.0

localpath commented 1 month ago

cc @sachokan

seven1m commented 1 month ago

Thank you for your report. Can you share what headers you are sending with the request? And the body of the request, if there is one.

Be sure to redact any secrets or sensitive information since this is a public forum.

seven1m commented 1 month ago

If you are sending a body with a GET request, CloudFront will block the request before it reaches our servers. This may be the issue. Since the Body tab in your first screenshot has a green dot, I suspect there is something being sent there.

localpath commented 1 month ago

🙌 It was in fact the cause! Thanks so much @seven1m . Its usually the simple thing! Somehow our postman calls got crossed up and saved but it would of been a long time until I would of noticed that to even try!

image