How to get Storefront API key with javascript?

Topic summary

  • Main issue: An app developer needs a Storefront API key to authenticate GraphQL queries against clients’ stores and asks how to obtain it using JavaScript.

  • Clarifications sought: Whether this key is meant to be retrieved/used on the frontend or handled via backend processes, and what the correct process is to obtain it from each client store.

  • Context: The poster has read the documentation but remains confused about the recommended approach and best practices for access and usage.

  • Status: No responses or guidance provided yet; no code snippets, images, or attachments referenced. The question remains open with key implementation details unresolved.

Summarized with AI on January 19. AI used: gpt-5.

I’m an app developer and to be able to use graphql queries I need this API key from my clients stores.

So how can I get this key with javascript? Is this key meant to be retrieved on frontend, or is it more like backend related work? I read the docs but still confused.