|
1
|
If you receive the following error response when you send a request to a `/store` route: |
|
2
|
|
|
3
|
```json |
|
4
|
{ |
|
5
|
"type": "not_allowed", |
|
6
|
"message": "Publishable API key required in the request header: x-publishable-api-key. You can manage your keys in settings in the dashboard." |
|
7
|
} |
|
8
|
``` |
|
9
|
|
|
10
|
## Why this Error Occurred |
|
11
|
|
|
12
|
This error occurs because the request is missing the `x-publishable-api-key` header. The `x-publishable-api-key` header is required for all requests to the `/store` route. |
|
13
|
|
|
14
|
--- |
|
15
|
|
|
16
|
## How to Fix it |
|
17
|
|
|
18
|
To resolve this error, add the `x-publishable-api-key` header to your request. You can find your publishable API key in the [Medusa Admin Dashboard](!user-guide!/settings/developer/publishable-api-keys). |
|
19
|
|
|
20
|
For example: |
|
21
|
|
|
22
|
```bash |
|
23
|
curl -X GET https://localhost:9000/store/products \ |
|
24
|
-H "x-publishable-api-key: your-publishable-api-key" |
|
25
|
``` |
|
26
|
|
|
27
|
Where `your-publishable-api-key` is your publishable API key. |
|
28
|
|
|
29
|
--- |
|
30
|
|
|
31
|
## Additional Resources |
|
32
|
|
|
33
|
- [API reference](!api!/store/publishable-api-key) |