Configuring TD Toolbelt Authentication for TD access

After you’ve installed TD Toolbelt, you’ll have access to td command from your command line. Next, you need to set up credentials for your account.

The endpoint you use differs depending on your region. If your account does not belong to the US region, you need to change endpoint in the command.

Info

Regardless of how you are signed up, TD Toolbelt requires your TD API key to authorize its requests. The information is saved in the ~/.td/td.conf file for future use.

Configuring Your TD Endpoint using TD Toolbelt

The default endpoint is set up in the configuration file. To setup a different endpoint, use the td server:endpoint command:

Copy
Copied
$ td server:endpoint https://api.treasuredata.com

Password-Based Authentication

You can set up the account credentials using the td account command. Use the username and password that you used when you signed up:

Copy
Copied
$ td -e https://api.treasuredata.com account -f
Email: user@domain.com
Password (typing will be hidden):


Authenticated successfully.

This command creates or updates the ~/.td/td.conf file with your master API key.

Setting Up SSO Users

You can set up your API using the setting up Google SSO users procedure.

  1. Obtain your API key from the TD Console.
  2. Set up an endpoint using the `td server:endpoint` command.
  3. Info

    The endpoint you use differs depending on your region. If your account does not belong to the US region, you need to change endpoint in the command.

  4. Use `td apikey:set ` to create or update the `~/.td/td.conf` file with the provided API key:
  5. Copy
    Copied
    API key is set.
    Use 'td db:create <db_name>' to create a database.
  6. If you are switching accounts, add an -f after the api-key to force a switch:
  7. Copy
    Copied
    $ td apikey:set <your_apikey> -f
    API key is set.
    Use 'td db:create <db_name>' to create a database.