Back

Get user by email

  • 0
  • Auth
  • Web
Jon-Eric Cook
5 Sep, 2024, 15:40

How would i get a user by their email?

I am integrating Paddle and their webhooks include a customer id (this is a customer id they created). I take the customer id and do a look up in their system for the user's email. Now that i have the email i dont know how to find the user in appwrite.

TL;DR
To get a user by email in Appwrite, you can use the following code snippet: ```js users.list([ Query.equal(“email”, USER_EMAIL_ADDRESS) ]) ``` This code will allow you to find a user based on their email address.
ideclon
5 Sep, 2024, 15:53

I haven’t tested it, but this should work

TypeScript
users.list([
    Query.equal(“email”, USER_EMAIL_ADDRESS)
])
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