Calling a Background action from a global action
I am calling a background action from a global action and it is not returning an authenticated shopify api client. This is the object it is returningg with no current object to use graphql:

5 Replies
Hello,
That's expected behavior. The only time that a Shopify connection is preset is when the call is from Shopify context where a session token or other auth method is available
so how do i make authenticated admin calls from this action? I'm thinking passing the shop id as a param how does that sound?
or suggest a better way to do this maybeml?
Yes, you should pass the shopId to the background action and then make the Shopify connection with forShopId
did that works like a charm thank you
No problem