Isak
Isak3mo ago

internal calls from outside

thanks, would be cool if you could call internal mutations from a trusted environment outside convex with a service token
10 Replies
jamwt
jamwt3mo ago
you actually can, but we recommend it cautiously right now, because you can only do this using "admin tokens" and admin tokens bestow the full power to do absolutely anything to your project including read all your production data, wipe all your code, change your code, etc we'll eventually created tokens with lesser authority that only allows you to call internal functions w/out allowing the caller to fully impersonate you, the developer & project owner
Isak
IsakOP3mo ago
interesting, can you generate an admin token yourself?
jamwt
jamwt3mo ago
yeah, in your dashboard
Isak
IsakOP3mo ago
hmm can't find that on what settings page is it? it's not deploy keys right?
jamwt
jamwt3mo ago
GitHub
convex-js/src/browser/simple_client.ts at main · get-convex/convex-js
TypeScript/JavaScript client library for Convex. Contribute to get-convex/convex-js development by creating an account on GitHub.
jamwt
jamwt3mo ago
there's the method
Isak
IsakOP3mo ago
thanks! but how do you get the actual admin key in the dashboard? can't find it in the dashboard sorry
jamwt
jamwt3mo ago
right now it probably is a deploy key, yes. @ballingt can you confirm?
Isak
IsakOP3mo ago
thanks jamie, works with a deploy key
ballingt
ballingt3mo ago
Yep, a deploy key works for that instance or a project-level deploy key (usually obtained through OAuth) should work in addition to a root user admin key (you probably don't want to use this though, it is too powerful; lets you do anything on any deployment on any project you own)

Did you find this page helpful?