Is possible to create snippets file during app installation?

Vj_Kumar
New Member
1 0 0

Hi 

I am new to shopify I am developing a app using PHP but got stcuk "Is possible to create snippets file during app installation?"

Can any help me how to do this any idea??

 

thanks

0 Likes
Josh_Brown1
Shopify Staff (Retired)
Shopify Staff (Retired)
143 0 28

Yes, you can create snippets using the Assets API.

0 Likes
nikola_cojcic
New Member
3 0 0

Correct @Josh_Brown1 

I have built the Shopiy App using shopify_app gem and I added after_authenticate_job in the App.

And I added the code to create snippets using Assets API.

But I have noticed that after_authenticate_job runs everytime when open the App in the Shopify Apps section.

Is there any way to create snippets only once such when the App is installed?

0 Likes