trevor
CCConvex Community
•Created by trevor on 12/28/2023 in #support-community
How to interact with Convex from an external Lambda / Serverless?
I have been really enjoying Convex, nice work team.
I think the part about Convex that has proven very confusing though is when I want to interact with Convex from a regular Lambda / Serverless function. I imagine the way to do that is like so:
This actually worked great for me. But now I have the case of needing to run some simple mutations and I want to verify that the user I'm mutating is the same as the logged-in user.
So, on the client side, I will call
And pass that auth token up to the serverless function with the request.
I imagined it was as simple as this and then recalling the function:
But it fails with this error:
I know that the whole app is otherwise working very well with client-side authentication and mutations correctly accessing the logged-in user. The setup with Clerk has otherwise been very unproblematic and easy to follow.
I've been stuck on this for the better part of the day. Can't seem to go any further. Thanks for any help you can provide.
6 replies