Files
medusa-store/www/apps/resources/app/commerce-modules/sales-channel/publishable-api-keys/page.mdx
Shahed Nasser 95eef899f7 docs: add notes + missing links for user guide (#11621)
* docs: add notes + missing links for user guide

* fix build errors

* fixes
2025-02-26 15:28:18 +02:00

29 lines
980 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { CodeTabs, CodeTab } from "docs-ui"
export const metadata = {
title: `Publishable API Keys with Sales Channels`,
}
# {metadata.title}
In this document, youll learn what publishable API keys are and how to use them with sales channels.
## Publishable API Keys with Sales Channels
A publishable API key, provided by the API Key Module, is a client key scoped to one or more sales channels.
When sending a request to a Store API route, you must pass a publishable API key in the header of the request:
```bash
curl http://localhost:9000/store/products \
x-publishable-api-key: {your_publishable_api_key}
```
The Medusa application infers the associated sales channels and ensures that only data relevant to the sales channel are used.
---
## How to Create a Publishable API Key?
To create a publishable API key, either use the [Medusa Admin](!user-guide!/settings/developer/publishable-api-keys) or the [Admin API Routes](!api!/admin#publishable-api-keys).