Error 401 : No API key found in request

Troubleshooting

Hello FF Community,

I'd like your help with something that seems simple but that I've been struggling with for a few days on my FlutterFlow application.
I'm working with Supabase as my backend.

I keep getting the same error in the logs (Error 401) : {"message": "No API key found in request", "hint": "No apikey request header or url param was found."}

In principle, it's quite simple: on my application, I have a button that, when clicked, automatically updates a score via a trigger in supabase. For the action linked to this button (screenshots), I perform a callback on the icon button in the component for an action I define on a main page. On this main page, the action when the button is clicked executes a backend call that inserts a row in my c_habit_clicks supabase table with habit_id, user_id, points, losses (0 by default) from another table called "a_habits" with these same variables.

The problem I'm having is that when I test the app, the row that should be created isn't in the c_habit_clicks supabase table, and the error displayed with F12 is the one mentioned at the beginning (error 401).

What have you tried so far?

I've deactivated all the RLS policies, I've also made the API manually with everything that should be to work, I've checked my web extansions, deleted cookies, changed browser, changed computer, deleted the table in question and the functions to redo everything, checked the API parameters between FlutterFlow and Supabase, tried to go into the code... to no avail...

Important to note, it was working fine before I jumped on other stuff like statistics functions for an other API call not directly linked with the c_habit_clicks table, the reason why I'm not sure this is relevant. I also added the 'losses' column in c_habit_clicks so the function to update changed only a bit. Also, I store the user_id locally because the app doesn't need email/password auth for the moment so I've disabled auth on supabase and flutteflow (and it was working with this stituation before the error)

I think it's an error linked to a lack of knowledge on my part, being rather new to code / app creation, but it's quite frustrating so I'm making a topic of it here.

Thanks in advance for your help! I stay available for details.

Did you check FlutterFlow's Documentation for this topic?
Yes
2
1 reply