Getting "301 Moved Permanently" error when hitting token endpoint

After months of no issues this error has popped up. No changes to my code… Worked fine until around 9:30am MT this morning. I can successfully hit the endpoint via Postman and get an access token but not through my code.

Verified that redirect exists in client.

Anyone else running into this? Have any suggestions?

301 moved permanently shouldnt come from Patreon side. What exaft endpoint are you calling?

https://www.patreon.com/api/oauth2/token

I had the same issue, though it was 401 unauthorized on my APIs, which were probably due to the 301 redirect which didn’t retain the authorization header on the redirect.
I found the issue to have been because I was using https://patreon.com/api/oauth2/ for my base URLs, which worked fine until a few hours ago. Adding the www. subdomain fixes it, so using https://www.patreon.com/api/oauth2/ as the base API url, fixed the 301 redirect and my 401 issues.

That did it! Thank you! Did Patreon change something to make this necessary?

Apparently, though I don’t see any notifications or anything to explain/justify it. It just sort of happened and I noticed because users complained they couldn’t login to my site anymore, then I investigated the cause :man_shrugging:

1 Like

Good catch, I was getting 405 & 401. Found the one place in all my code I didn’t put www. and it worked.
Why on earth would they remove a DNS entry on a Friday night is beyond me. Ruined my Saturday.

I even get 405 for the www one (at least for token, not for campaigns)

Is the tokens endpoint working for you?

Yeah, after adding “www.” to the API url.

Hmm, the token endpoint doesnt even work in postman for me