I copied the headers over from Postman, where the request works. The above request works as well, but it requires this line in the headers 'User-Agent': 'PostmanRuntime/7.39.0' which feels wrong to me.
Without that entry in the headers, I receive 403 Forbidden error.
Can someone help me understand why this is necessary and what I could replace it with so that my app works? What am I doing wrong here?
I am having the 403 issue since yesterday (Forum post) (before that, everything worked great for days), so I assume it is an issue on Patreon’s side (I contacted support some hours ago).
Setting the user agent to Postman works for me as well, so thank you for mentioning this workaround!
I noticed I was getting served a website response as well, so I’m assuming it is the same as this issue.
Turns out Patreon added a security feature to serve a robot check CAPTCHA to any request without the User-Agent header as it’s a signal that the request is coming from malware.
Works in Postman because Postman automatically generates the User-Agent header.
I searched the entire API documentation for the word “User-Agent” but nothing return. This should really be included in the docs!
I haven’t tested yet but I believe any value for the header should work. Something like “node” or “Cloudflare-worker” is probably fine but again need to test!