How to call first time operation when user install the my app

17 0 2

So I would perform certain operations whenever the user installs my app for the first time.

In which part in my node app, I should put this code?

Note: Code will be run only once when a user installs the app, I've created an app using shopify node create.

Replies 2 (2)

Shopify Partner
87 8 15

In the afterAuth function, the same place were uninstall webhook is registered. You can check if the shop exists in the db or not, if it does not exist then it's first time install.

Shopify Partner
2 0 0

Is the afterAuth function still available?  I can't find it in their webhook documentation