Back

[SOLVED] user_unauthorized in appwrite function execution

  • 0
  • Functions
dammy
6 Jun, 2023, 20:46

I set endpoint, projectID, key

Still didn't @D5

TL;DR
The user was having trouble receiving data from a function execute on the client side. They were advised to define the necessary permissions in the appwrite.json file to prevent errors. They were also reminded to set the permissions in the appwrite.json file instead of manually setting them each time they deploy the function. The issue was eventually solved.
D5
6 Jun, 2023, 20:48
D5
6 Jun, 2023, 20:48

In your appwrite dashboard

D5
6 Jun, 2023, 20:48

Wait

D5
6 Jun, 2023, 20:49

@dammy Do you get such error after triggering the function through appwrite dashboard manually?

dammy
6 Jun, 2023, 20:52

Ooo, I appreciate

D5
6 Jun, 2023, 20:52

So does that solves your problem?@dammy

D5
6 Jun, 2023, 20:53

If not tell me

dammy
6 Jun, 2023, 20:53

Worked, I appreciate you @D5

dammy
6 Jun, 2023, 20:53

[solved] - user_unauthorized in appwrite function execution

D5
6 Jun, 2023, 20:53

[SOLVED] user_unauthorized in appwrite function execution

D5
6 Jun, 2023, 20:54

Ops, we just changed at the same time ๐Ÿ˜†

dammy
6 Jun, 2023, 20:54

I wanted saying so ๐Ÿ˜Š

dammy
6 Jun, 2023, 20:54

You're the best @D5

dammy
6 Jun, 2023, 20:54

You're a flutter developer?

D5
6 Jun, 2023, 21:45

Yes

D5
6 Jun, 2023, 21:45

Thanks <:appwritepeepo:902865250427215882>

Drake
6 Jun, 2023, 22:02

Make sure to put the permission in your appwrite.json or it will be wiped after the next deploy

dammy
6 Jun, 2023, 22:04

Okay then

Though I go to console for permit each time I deploy

Drake
6 Jun, 2023, 22:05

Sorry I don't understand

dammy
6 Jun, 2023, 22:17

Anytime I deploy the functional fresh I will always go to my console and give it permission for execution

D5
6 Jun, 2023, 22:27

You can define it in your appwrite.json file located in the function folder you deploy if you want to make it predefined and not having to set permissions each time you deploy your function. But sincerely, I just go to the console and give them manually, don't want to get new errors accidentally ๐Ÿ˜†

D5
6 Jun, 2023, 22:28

But it's true the best solution is defining it in the appwrite.json file

dammy
6 Jun, 2023, 22:39

Okay then, I'll check for an example

dammy
6 Jun, 2023, 22:47

lastly, I couldn't find how to receive data from function execute on client side after passing jsondecode and work with it in function code from server and receiving response from server result

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more