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:
No description
5 Replies
Chocci_Milk
Chocci_Milk6mo ago
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
safwan
safwanOP6mo ago
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?
Chocci_Milk
Chocci_Milk6mo ago
Yes, you should pass the shopId to the background action and then make the Shopify connection with forShopId
safwan
safwanOP6mo ago
did that works like a charm thank you
Chocci_Milk
Chocci_Milk6mo ago
No problem

Did you find this page helpful?