-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: API request with x-medusa-access-token header always returns Unauthorized #10691
Comments
I'm having kind of the same issue here. I'm following along the Medusa tutorial in the docs. I'm at the stage where a brand is add via curl. curl -X POST 'http://localhost:9000/admin/brands' |
you need to use only the token in the header, without " or {}.
|
Hello, can you specify exactly how you created this api key? |
Package.json file
Node.js version
v20.10.0
Database and its version
PostgreSQL (default with npx create-medusa-app@latest on 12/17/24)
Operating system name and version
MacOS Sonoma 14.5 (23F79)
Browser name
Arc
What happended?
The API Keys that I generate via the Medusa Admin web app do not authorize my Admin API requests.
Expected behavior
❯ curl --request GET
--url http://localhost:9000/admin/custom
--header 'x-medusa-access-token: REDACTED' \
Should respond 200
Actual behavior
❯ curl --request GET
--url http://localhost:9000/admin/custom
--header 'x-medusa-access-token: REDACTED' \
{"message":"Unauthorized"}%
Link to reproduction repo
https://github.com/amunrarara/medusa-auth-header-bug
The text was updated successfully, but these errors were encountered: