Back

Getting the user id of a user executing a function

  • 0
  • Functions
BoxC4T
30 Sep, 2024, 04:24

A function I am creating needs the id of the user who ran the function and all the information on how to do this seems to be for the deprecated req.variables way.

TL;DR
Developers are asking for the user's id executing a function. This can be retrieved from the header "x-appwrite-user-id". The deprecated req.variables method should be avoided, use the header instead.
Joshi
30 Sep, 2024, 04:38

Retrieve it from the header "x-appwrite-user-id"

BoxC4T
30 Sep, 2024, 04:45

thank you

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