Hi, I try to integrate appwrite (cloud) with Flutter Flow via REST API calls. I can log in (start an email session) and I am getting "x-fallback-cookies" in return in a header. Next I try to use the "X-Fallback-Cookies": "a_session_65...ac=ey...J9" to get user name via https://cloud.appwrite.io/v1/account but I am getting:
{ "message": "User (role: guests) missing scope (account)", "code": 401, "type": "general_unauthorized_scope", "version": "0.12.45" }
With Postman and the same data, same headers I am getting the right response (also with "Cookies" key instead of "X-Fallback-Cookies"). What am I doing wrong?
appwrite and FlutterFlow integration - REST API
Did you include the project header?
@steven, yes.
Are you able to inspect the network requests?
@Drake I can check these:
When I do the same from Postman, I am getting correct JSON and 200 OK from GET request.
Is the request being sent via the browser or proxied through flutterflow?
Is it the exact same cookie value in postman?
From flutter flow. Yes, I use the same cookie value in Postman (copy / paste).
One from US (FlutterFlow), one from PL (Postman) - both were started for testing. Later I tried using both cookies sessions in both FF and Postman, just to see if something would work. In Postman all of them work, in FF none of them.
I wonder if flutterflow is tweaking the request somehow 🧐
Chrome? Uhh so is it not proxied? Can you see the request if you open the network inspector in the browser dev tools?
LEt me check.
Recommended threads
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...