Get Access Token or Session from an App Extension call (Bulk Action Link)

Topic summary

Issue: A Shopify app extension triggered from the Orders page (bulk action link) returns order IDs but no usable session. Calling Shopify.Utils.loadCurrentSession after the extension request yields undefined, blocking GraphQL Admin API calls.

Key details:

  • Extension request includes query params (hmac, host, ids, locale, session, shop, timestamp), but not an authenticated app session.
  • Redirecting to the app and then attempting loadCurrentSession still fails.

Proposed approach:

  • Do not rely on a session from the extension callback. Instead, use the store’s access token obtained during app installation.
  • Store the access_token in your database on install and retrieve it for API calls.
  • Prefer offline access (long-lived) sessions/tokens; use loadOfflineSession and persist the token for subsequent GraphQL queries.

Status: No confirmed implementation reported yet. The original poster agrees with storing/offline tokens as the likely path, but hasn’t tested. Another participant reports the same undefined session issue. Discussion remains open without a verified resolution.

Summarized with AI on February 18. AI used: gpt-5.

Hi, did you solve the undefined session after calling loadCurrentSession?

I’ve the same exact problem.

thanks in advance.

F.