Suddenly getting 401 errors on api

By: Andrew Christensen | Asked: 12/07/2023
ForumsCategory: Code HelpSuddenly getting 401 errors on api
Andrew Christensen asked 5 months ago
All of a sudden very recently the Formidable API started throwing 401 unauthorized errors for users that are not logged in. I DO have the basic auth being passed in via the ajax call going to the server. Even more confusing, the api works for calls from our other sites to this one site (using WP API Get plugin - NOT ajax calls). But it's failing on the ajax calls from inside the api host site. I have NO CLUE what could have happened. We didn't change anything on our end. Something else changed. I assume it's something with Formidable as there have been some updates recently. How can I rollback the version of formidable? This is URGENT. Please help.  
1 Answers
Andrew Christensen answered 5 months ago
I found the problem. I had manually base64 encoded the api token before and was just passing that as the basic auth string. This was failing recently. I changed it to base64 encode the api key followed by ":x" and now it works. Something changed that is requiring a password of some sort and not just the api key to be encoded. Breaking changes like this are really bad for business.
Victor Font replied 5 months ago

If something changed requiring a password, it sounds like your remote API changed and not Formidable.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right