{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Guides","type":"markdown"},"seo":{"title":"Configuring Authentication for TD Using the TD Toolbelt","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"configuring-authentication-for-td-using-the-td-toolbelt","__idx":0},"children":["Configuring Authentication for TD Using the TD Toolbelt"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After you’ve installed the TD Toolbelt, you’ll have access to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td"]}," command from your command line. Next, you need to set up the credentials for your account."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are three ways to sign up:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/configuring-authentication-for-td-using-the-td-toolbelt#password-based-authentication"},"children":["Password-Based Authentication"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/configuring-authentication-for-td-using-the-td-toolbelt#setting-up-google-sso-users"},"children":["Setting Up Google SSO Users"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/configuring-authentication-for-td-using-the-td-toolbelt#setting-up-identify-federation-users"},"children":["Setting Up Identify Federation Users"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Regardless of how you are signed up, the TD Toolbelt requires your Treasure API key to authorize its requests. The information is saved in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.td/td.conf"]}," file for future use."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"password-based-authentication","__idx":1},"children":["Password-Based Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can set up the account credentials with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td account"]}," command. Use the username and password that you used when you signed up:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td -e https://api.treasuredata.com account -f\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Email: user@domain.com\nPassword (typing will be hidden):\n        \nAuthenticated successfully.  \n"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The endpoint you use will differ depending on your region. If your account does not belong to the US region, you need to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["change endpoint in the command"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This command will create or update the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.td/td.conf"]}," file with your master API key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setting-up-google-sso-users","__idx":2},"children":["Setting Up Google SSO Users"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Obtain your API key from the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://console.treasuredata.com/app/users/current"},"children":["Treasure Console"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You need to set up an endpoint, use the  ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["td server:endpoint"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/api"},"children":["command"]},"."]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The endpoint you use will differ depending on your region. If your account does not belong to the US region, you need to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["change endpoint in the command"]},"."]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td apikey:set <your api-key>"]}," to creates or updates the ~/.td/td.conf file with the provided API key:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td apikey:set <your_apikey>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"API key is set.\nUse 'td db:create <db_name>' to create a database.  \n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["If you are switching accounts, add an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-f "]},"after the api-key to force a switch:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td apikey:set <your_apikey> -f\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"API key is set.\nUse 'td db:create <db_name>' to create a database.  \n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setting-up-identify-federation-users","__idx":3},"children":["Setting Up Identify Federation Users"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can set up your API by following the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/configuring-authentication-for-td-using-the-td-toolbelt#setting-up-google-sso-users"},"children":["Setting Up Google SSO Users"]}," procedure."]}]},"headings":[{"value":"Configuring Authentication for TD Using the TD Toolbelt","id":"configuring-authentication-for-td-using-the-td-toolbelt","depth":1},{"value":"Password-Based Authentication","id":"password-based-authentication","depth":2},{"value":"Setting Up Google SSO Users","id":"setting-up-google-sso-users","depth":2},{"value":"Setting Up Identify Federation Users","id":"setting-up-identify-federation-users","depth":2}],"frontmatter":{"seo":{"title":"Configuring Authentication for TD Using the TD Toolbelt"}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/tools/cli-and-sdks/configuring-authentication-for-td-using-the-td-toolbelt","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}