Using Auth tokens with Tinybird.js

In order to read, append or import data in you Tinybird Analytics account, you’ll need an Auth Token with the right permission. Tinybird Analytics uses Auth tokens to associate requests and permissions with your account as well.

You can list all your Auth tokens, create new ones, or delete existing ones using the following API or in the Console UI

You normally set your Auth token when creating an tinybird() object

//norun
let tinyb = tinybird(your_auth_token)

Scopes and tokens

When an access token is created, you have the choice to give it a set of zero or more scopes that define which tables can be accessed by that token and which methods can be used to access them.

Available scopes syntax

Value

Description

READ:table_name

Gives your Auth token read permissions for the defined datasource or pipe

APPEND:table_name

Allows your Auth token to append data to the defined datasource or pipe

IMPORT

Enables your Auth token to import data to your account

TOKENS

Gives your Auth token the capacity of managing Auth tokens

ADMIN

All permissions will be granted. Use carefully!