POST /v1/run. A script reads them like any variable. They’re read-only, and their names are reserved. See Built-in variables in the RequestScript docs for the language rules.
Stellarium passes one built-in: jwt.
jwt
jwt is the decoded run token the run was made with, as an object. The node has already verified it: it is signed by the operator, unexpired and addressed to this node.
For a run made with the node’s
API_KEY, there is no token, and jwt is null:
Passing the caller to a function
Usejwt to tell a resource function who is calling, for example to keep a quota per API client:
Rules
jwtcan’t be changed.jwt = ...,jwt.sub = ..., and changes through a variable that holds it, fail the script.- You can’t declare a variable named
jwt.
422 with "error": "Script failed", and a billed run is charged for the tokens it executed.