anmot.
anmot.7mo ago

Failing with InvalidAdminKey when calling HTTP Action with custom Authorization header

Hello team, I’ve created a HTTP action for a third party callers to consume. When the caller passes the Authorization header in the POST request, the API returns InvalidAdminKey. It seems Convex is internally looking for its own Authorization header, which is causing a conflict with the external caller’s header. Can someone please help?
{
"code": "InvalidAdminKey",
"message": "Invalid admin key"
}
{
"code": "InvalidAdminKey",
"message": "Invalid admin key"
}
10 Replies
Michal Srb
Michal Srb7mo ago
So if you have auth setup in Convex, you can use the Authorization header: https://docs.convex.dev/functions/http-actions#authentication
Authorization: `Bearer ${jwtToken}`,
Authorization: `Bearer ${jwtToken}`,
Is your issue that you don't want Convex to process the Authorization header, but it does, and it makes your HTTP action fail?
HTTP Actions | Convex Developer Hub
HTTP actions allow you to build an HTTP API right in Convex!
anmot.
anmot.OP7mo ago
Yes in this scenario, authorization header is set by a thrid party caller on a HTTP request and ideally convex shouldn’t proceess this header and fail the request.
Michal Srb
Michal Srb7mo ago
Agreed, this sounds like a bug indeed.
anmot.
anmot.OP7mo ago
Yes. I just started exploring convex so far I like it very much but this is blocker for my integration. Sorry to ask but do you have a rough estimate when this might be potentially get fixed? I’m trying to evaluate my options here.
Michal Srb
Michal Srb7mo ago
I think we can get it fixed within the next 48 hours
anmot.
anmot.OP7mo ago
Wow! That’s awesome. You guys are doing great. Thanks for helping. I will wait for the fix.
Michal Srb
Michal Srb7mo ago
(Looking at the calendar, it's Friday, so it might be fixed on Monday 🙂 )
anmot.
anmot.OP7mo ago
No problem I can wait 🙂
sshader
sshader7mo ago
Working on a fix! If you want to send your instance name (something like happy-animal-123, either here or over DM), I can try and get this fixed for you before Monday
anmot.
anmot.OP7mo ago
Thanks @sshader. Sent you in the DM. It’s working now. Thank you for resolving this issue so quickly. I appreciate your prompt response.

Did you find this page helpful?