After you’ve installed the TD Toolbelt, you’ll have access to the td command from your command line. Next, you need to set up the credentials for your account.
There are three ways to sign up:
Regardless of how you are signed up, the TD Toolbelt requires your TD API key to authorize its requests. The information is saved in the ~/.td/td.conf file for future use.
You can set up the account credentials with the td account command. Use the username and password that you used when you signed up:
$ td -e https://api.treasuredata.com account -fEmail: user@domain.com
Password (typing will be hidden):
Authenticated successfully. The endpoint you use will differ depending on your region. If your account does not belong to the US region, you need to change endpoint in the command.
This command will create or update the ~/.td/td.conf file with your master API key.
Obtain your API key from the TD Console.
You need to set up an endpoint, use the td server:endpoint command.
The endpoint you use will differ depending on your region. If your account does not belong to the US region, you need to change endpoint in the command.
- Use
td apikey:set <your api-key>to creates or updates the ~/.td/td.conf file with the provided API key:
$ td apikey:set <your_apikey>API key is set.
Use 'td db:create <db_name>' to create a database. - If you are switching accounts, add an
-fafter the api-key to force a switch:
$ td apikey:set <your_apikey> -fAPI key is set.
Use 'td db:create <db_name>' to create a database. You can set up your API by following the Setting Up Google SSO Users procedure.