This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
Replies: 1 comment
-
To get the $shop, you can refer to this file. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am new to shopify app development. I want to make ADMIN API call in Laravel Jobs that is when webhook notification is triggered.
Here is the details of app flow:
The main problem I have is how to authenticate user in webhook. I know to authenticate the user within Shopify admin using
$shop = Auth::user(); $shopApi = $shop->api()->rest('GET', '/admin/shop.json')['body']['shop'];
. But this donot work in Laravel Job handle method.I was thinking to save the access-token that is generated " $shop = Auth::user(); $shopApi = $shop->api()". But I can't seem to find the way to access the access_token and save it into the database so that I can use same access_token to make billing api requests.
Is this approach the best approach. Does access_token has any expiry date?
Please recommend if there is any best approach as well.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions