Function calling via postman doesn't work

  • 0
  • Functions
  • Cloud
10 Jul, 2024, 05:46

Hi there. I would like to call a function in the cloud via postrman with a users only permission but I get user_unauthorized. Cookies are not applying to the invocation cuz the function comes with a different domain name. I tried to use X-Appwrite-JWT I generated via v1/account/jwt however it doesn't help.

How can I invoke a function as a loggined user via postman? Thanks

Issue: Developer unable to call a cloud function using Postman, getting 'user_unauthorized' error due to cookies not applying to cross-domain function invocation. Solution: Use X-Appwrite-JWT generated via v1/account/jwt in Postman headers to authenticate and invoke the function as a logged-in user.
10 Jul, 2024, 05:48

What headers did you use for setting cookies? How did you access the cookies?

10 Jul, 2024, 05:54

@darShan Thanks for the quick answering,

Here's a header I've been using for my cloud function calling

Cookie: a_session_[redacted]_legacy=[redacted];a_session_[redacted]=[redacted]
10 Jul, 2024, 05:55

P.S. X-Appwrite-Project has been set as well


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