MrBithles
MrBithles2mo ago

Call a convex query from server worker with machine2machine auth/jwt - is that possible?

Hey all, super new here and trying out convex. I question about being able to call convex from an external server. I have some Cloudflare workers that run on schedules and these workers need to enrich an existing model in Convex on completion, but I am struggling to find any documentation about this (other than small paragraph about it https://docs.convex.dev/auth#service-authentication). I am wondering if its possible to do this or do I need to make a secret that is verified in public url task.
Authentication | Convex Developer Hub
Add authentication to your Convex app.
2 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
jamwt
jamwt2mo ago
hi! yes, a shared secret is the way to do this you can set this shared secret in your convex deployment environment and just verify it in your mutations/queries the CF environment calls all this goes over TLS, so it is secure many convex projects do this

Did you find this page helpful?