Authentication
To create a Public Access Token, you can use theauth.createPublicToken function in your backend code:
Scopes
By default a Public Access Token has no permissions. You must specify the scopes you need when creating a Public Access Token:Expiration
By default, Public Access Token’s expire after 15 minutes. You can specify a different expiration time when creating a Public Access Token:- If
expirationTimeis a string, it will be treated as a time span - If
expirationTimeis a number, it will be treated as a Unix timestamp - If
expirationTimeis aDate, it will be treated as a date
Auto-generated tokens
When triggering a task from your backend, thehandle received from the trigger function now includes a publicAccessToken field. This token can be used to authenticate requests in your frontend application:
trigger function expire after 15 minutes and have a read scope for that specific run. You can customize the expiration of the auto-generated tokens by passing a publicTokenOptions object to the trigger function:
batchTrigger function:

