Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
I am creating a webhook handler (within aws lambda) for my shopify app.
Note: I'm using eventbridge to receive webhooks, but i believe the concept is the same.
When a customer creates a new order this webhook will be called, and from within my webhook handler i would like to make an authenticated request to the Nodejs `@shopify/shopify-api` Admin API.
My question is, what is the best way to do this?
For example, how do i use the details from the webhook event to create a session which i can then use to make requests to the Admin API?
eg;
const product = await shopify.rest.Product.find({session, id: '7504536535062'}); product.title = 'A new title'; await product.save({ update: true, });