Authenticate your device and link it to your thirdweb account with the thirdweb CLI. By logging in, you can access the thirdweb infrastructure and services which the CLI commands use under the hood such as storage.

npx thirdweb login [options]


If it's your first time using the CLI you will need to login with the dashboard in order to use the following commands:

Once you've logged in, your devices will be authorized for future use.

To create a new device to link to your account, use the --new flag.

npx thirdweb login --new


  • -n <string> or --new <string> - Login with a new API secret key

Login with the dashboard

  • Run the login command, this will open the dashboard to allow you to link your device to your thirdweb account.
  • Choose a Device name to identify the device from the devices linked to your account.
  • Click the Authorize device button.
  • Sign the message with your wallet (this step is gasless) to authorize the device.

This only needs to be done once per device.

How it Works

When you login with the dashboard, a number of things happen:

  • A local wallet is created and stored in your device's local storage.
  • An auth token is generated for this local wallet.
  • The auth token is linked to your wallet when you sign the message.

Login with an API secret key

If you want to login with an API secret key, e.g. you are using continuous integration (CI), you can use the --key flag and pass a secret key. For example, if you are running the generate command with CI:

npx thirdweb generate --key <secret-key>

Revoking Access

To revoke access to a device:

  • Navigate to the dashboard Settings page
  • Click the Accounts tab from the sidebar and find the device you would like to revoke.
  • Click the Revoke Access button to revoke access to the device.