Back

Callback Function upon account creation

  • 0
  • Accounts
neutrino
25 May, 2023, 02:51

Is there a way to execute a Function when a new account has been created, as a type of callback?

TL;DR
Solution: Yes, you can execute a function when a new account is created. You can set the trigger for your function either in the function settings page or in the `appwrite.json` file. The available account events can be found in the documentation under authentication events. The event `users.*.create` specifically triggers when a user is created.
Binyamin
25 May, 2023, 02:51

Yes,

Binyamin
25 May, 2023, 02:53

You'll need to set trigger for your function.

Here you can see all avaiable account events https://appwrite.io/docs/events#authentication-events

You'll probably use this one users.*.create = This event triggers when a user is created

Binyamin
25 May, 2023, 02:53

You can set the trigger to the function either in the function settings page πŸ‘‡.

Binyamin
25 May, 2023, 02:54

Or in the appwrite.json file that you'll have after you've initiate the function using the cli as you can see here; https://appwrite.io/docs/functions#gettingStarted

neutrino
25 May, 2023, 02:54

Thanks!!

neutrino
25 May, 2023, 02:54

Amazing responsiveness ❀️

neutrino
25 May, 2023, 02:54

I'll dive into the docs

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