Publishable API Key
API key in the header of your requests.
How to Create a Publishable API Key
or using the Medusa admin.
How to Use a Publishable API Key
x-publishable-api-key
in all your requests to the store APIs:
import { MedusaProvider } from "medusa-react"
// define query client...
const App = () => {
return (
<MedusaProvider
queryClientProviderProps={{ client: queryClient }}
baseUrl="http://localhost:9000"
// ...
publishableApiKey={publishableApiKey}
>
<MyStorefront />
</MedusaProvider>
)
}