Getting 401 Unauthorized When Trying to Add Product via API or Seed Script #13158
Unanswered
yankdownunderbbq
asked this question in
Q&A
Replies: 2 comments
-
Exactly same issue here |
Beta Was this translation helpful? Give feedback.
0 replies
-
Did you set the domain(s) to the CORS? in your medusa-config.ts: defineConfig({
projectConfig: {
databaseUrl: process.env.DATABASE_URL,
http: {
storeCors: process.env.STORE_CORS!,
adminCors: process.env.ADMIN_CORS!,
authCors: process.env.AUTH_CORS!,
}
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m running into a persistent issue when trying to add a product to my Medusa backend—whether via Postman, cURL, or a custom seed script. Every attempt returns a 401 Unauthorized error.
Even trying to get a JWT token with valid username and password on admin/auth returns a 401.
(I just hooked up a new domain to my production environment, wondering if that could cause the problem)
Has anyone faced this issue recently? Any suggestions on where else to check would be much appreciated.
Thanks in advance!
— Reggie
Beta Was this translation helpful? Give feedback.
All reactions