{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Integration Hub","type":"markdown"},"seo":{"title":"Reusing an Existing Authentication","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":"reusing-an-existing-authentication","__idx":0},"children":["Reusing an Existing Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide is to explain a new feature called \"Reuse Connector Authentication.\" This feature allows clients to reuse an existing connector authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instead of creating a new authentication for each new integration, you can reuse existing authentications. This is more secure and saves time when setting up the integration. It also makes integrations that only support OAuth2 authentication method available for workflow and the TD Toolbelt CLI."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-and-reusing-an-authentication","__idx":1},"children":["Creating and Reusing an Authentication"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-new-authentication-optional","__idx":2},"children":["Create a New Authentication (optional)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If required, create a new authentication:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the Treasure Console."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub > Catalog"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/26617500.ca92fa4ab9277dca95973c6bd413fc662a3f0d04b57d58f7a8c952a29f28bbec.ef656343.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Search for your Integration in the Catalog; then hover your mouse over the icon and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/26617501.d6a5ad453f9fa98b4336af9506dadbd04ea44299e2f9af7fd760f75ac68e3f88.ef656343.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure that the Credentials tab is selected and then enter credential information for the integration."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Authentication details vary depending on the type see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int"},"children":["About Treasure Data Integrations"]},". Here is an example authentication page:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2022-4-18_11-7-14.94b62d1ba550c90c07c8664e6b98c607512237d3e1ca928c681329ba4c042beb.ef656343.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter a name for your authentication and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"identify-the-existing-authentication-id","__idx":3},"children":["Identify the existing Authentication ID"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To reuse an existing authentication, you first need to identify the Authentication ID. This ID is usually displayed in the browser URL of the Authentications. Following the step here to get the Authentication ID of a saved authentication."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["On Treasure Console UI."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub > Authentications"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click on a saved authentication."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Copy and save the Authentication ID in the browser URL."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/authid.8ef0eb138b0aca4a9fdfd1d3efabb92353a04b78567d36f64199b75e3e46dcfc.ef656343.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"using-an-existing-authentication","__idx":4},"children":["Using an Existing Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To reuse an existing authentication, specify the config key td_authentication_id with the value of the Authentication ID. In the example above, the value would be 255574."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This config key can be used in the following CLI commands:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["connector:guess"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["connector:preview"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["connector:issue"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["connector:create"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["connector:update"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["sched:create"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["sched:update"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["query"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["export:result"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It can also be used with the following workflow operators:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td_run"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["td_load"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"examples-of-reusing-an-authentication-in-new-job-and-workflow-configurations","__idx":5},"children":["Examples of Reusing an Authentication in New Job and Workflow Configurations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For new job or workflow configurations, simply set the td_authentication_id to the Authentication ID. In some cases, you will need to first create a config.yml file the has been configured with the specific td_authentication_id."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, here is an S3_v2 integration that uses the authentication method assume_role."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image003.473bc72550b7f89df3d72ea9cbd484323780c34ee3eebc52ae2d07e228f3ee99.ef656343.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configuration file for connector:guess"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this file, named s3_v2_seed.yml, the td_authentication_id is set to the authentication ID 260370. This file will be used to create the config.yml file."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"---\nin:\n  type: s3_v2\n  td_authentication_id: 260370\n  bucket: qa-auto-test-3\n  path_prefix: 'qh_s3connector_test/Compress/assume_role_staging.csv'\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connector:guess"]}," results"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["connector:guess uses the s3_v2_seed.yml to create the config.yml file which is used by TD Toolbelt CLI commands."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxx \\\n-e https://api.treasuredata.com \\\nconnector:guess s3_v2_seed.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Guessed configuration:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"---\nin:\n  type: s3_v2\n  bucket: qa-auto-test-3\n  path_prefix: qh_s3connector_test/Compress/assume_role_staging.csv\n  parser:\n    charset: UTF-8\n    newline: CRLF\n    type: csv\n    delimiter: \",\"\n    quote: \"\\\"\"\n    escape: \"\\\"\"\n    trim_if_not_quoted: false\n    skip_header_lines: 1\n    allow_extra_columns: false\n    allow_optional_columns: false\n    columns:\n    - {name: path, type: string}\n    - {name: cnt, type: string}\n    - {name: user, type: string}\n    - {name: host, type: string}\n    - {name: referer, type: string}\n    - {name: code, type: long}\n    - {name: agent, type: string}\n    - {name: size, type: long}\n    - {name: method, type: string}\n    - {name: time, type: long}\n  td_authentication_id: 260370\nout: {}\nexec: {}\nfilters: []\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Created config.yml file."," ","Use 'td -k 1/xxx -e https://console.treasuredata.com connector:preview config.yml' to see bulk load preview."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connector:preview"]}," results"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxx \\\n-e https://console.treasuredata.com \\\nconnector:preview config.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connector:issue"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxx \\\n-e https://api.treasuredata.com \\\nconnector:issue config.yml --database tuan_db --table test_tbl\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connector:create"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxxx \\\n-e https://api.treasuredata.com \\\nconnector:create bulkload_data_from_s3 \\\n\"0 * * * *\" tuan_db test_tbl config.yml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["connector:update"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxx -e https://api.treasuredata.com connector:update bulkload_data_from_s3 -c config.yml -s '0 0 * * *'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["sched:create"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxx \\\n-e https://api.treasuredata.com \\\nsched:create result_to_s3_v2 '0 0 * * *' \\\n--database tuan_db \\\n'SELECT * from aaks' \\\n--result '{\"type\":\"s3_v2\",\"td_authentication_id\":260370,\"duration_in_seconds\":3600,\"bucket\":\"qa-auto-test-3\",\"path\":\"qh_s3connector_test/Compress/assume_role_staging1.csv\",\"format\":\"csv\",\"compression\":\"none\",\"header\":true}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["sched:update"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k 1/xxx \\\n-e https://api.treasuredata.com \\\nsched:update result_to_s3_v2 -s '0 0 * * *' \\\n--database tuan_db \\\n--result '{\"type\":\"s3_v2\",\"td_authentication_id\":260370,\"duration_in_seconds\":3600,\"bucket\":\"qa-auto-test-3\",\"path\":\"qh_s3connector_test/Compress/assume_role_staging2.csv\",\"format\":\"csv\",\"compression\":\"none\",\"header\":true}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["query"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k \"1/xxxx\" \\\n-e https://api.treasuredata.com \\\nquery --database tuan_db \\\n--wait \"SELECT * from aaks\" --type presto \\\n--result '{\"type\":\"s3_v2\",\"td_authentication_id\":260370,\"duration_in_seconds\":3600,\"bucket\":\"qa-auto-test-3\",\"path\":\"qh_s3connector_test/Compress/assume_role_staging.csv\",\"format\":\"csv\",\"compression\":\"none\",\"header\":true}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["export:result"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td -k \"1/xxxx\" \\\n-e https://api.treasuredata.com \\\nexport:result 1696822041 \\\n'{\"type\":\"s3_v2\", \"td_authentication_id\":260370, \"bucket\": \"qa-auto-test-us-east-1\", \"path\":\"quang/test_export_result_02.csv\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"examples-of-new-workflow-configurations","__idx":6},"children":["Examples of New Workflow Configurations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_load"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this example, the td_load command uses the s3_v2_guessed.yml where td_authentication_id is set to 260370.."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"s3_v2_guessedyml-file","__idx":7},"children":["s3_v2_guessed.yml file"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"---\nin:\n  type: s3_v2\n  td_authentication_id: 260370\n  bucket: qa-auto-test-3\n  path_prefix: 111time.csv\n  parser:\n    charset: UTF-8\n    newline: CRLF\n    type: csv\n    delimiter: \",\"\n    quote: \"\\\"\"\n    escape: \"\\\"\"\n    trim_if_not_quoted: false\n    skip_header_lines: 1\n    allow_extra_columns: false\n    allow_optional_columns: false\n    columns:\n    - name: col_1\n      type: string\n    - name: col_2\n      type: string\n    - name: col_3\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+import_from_s3_assume_role_with_existing_connection:\n  td_load>: s3_v2_guessed.yml\n  database: tuan_data\n  table: wf_test\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["query"]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+query_data_and_write_result_with_existing_connection_by_url:\n  td>:\n  query: 'select * from wf_test'\n  database: tuan_data\n  result_url: '{\"td_authentication_id\": 260370, \"bucket\": \"qa-auto-test-3\", \"path\": \"viet/assume_role_from_eu01.csv\"}'\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_run"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this example, presto_select_all_s3v2 is a saved query."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+query_sql:\n  td_run>: presto_select_all_s3v2\n  database: quang\n  result_url: '{\"type\":\"s3_v2\", \"td_authentication_id\":260370, \"bucket\": \"qa-auto-test-us-east-1\", \"path\":\"quang/wf_jan16_1444.csv\"}'\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td_result_export"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This operator supports the reuse of an existing integration authentication in the legacy manner, by returning the name of the authentication on Treasure Console UI in result_connection."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"_export:\n  td:\n    database: quang\n\n+export_query_result:\n  td_result_export>:\n  job_id: 14660140\n  result_connection: quang_s3v2_happy_case_1195\n  result_settings:\n    bucket: qa-auto-test-us-east-1\n    path: quang/s3v2_wf_jan16_1655.csv\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"example-of-reusing-an-authentication-in-an-existing-job-or-workflow-configuration","__idx":8},"children":["Example of Reusing an Authentication in an Existing Job or Workflow Configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For existing job and workflow configurations, simply remove the existing connector authentication declarations from the configuration, and replace them with td_authentication_id specifying the authentication ID. In this example, the authentication that was obtained from the end of the authentication URL in Treasure Console is 11."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image005.7b64922d3538209cbd99829b9ebd4869c41055c580432949806338d151aad11c.ef656343.png","alt":""},"children":[]}]}]},"headings":[{"value":"Reusing an Existing Authentication","id":"reusing-an-existing-authentication","depth":1},{"value":"Creating and Reusing an Authentication","id":"creating-and-reusing-an-authentication","depth":2},{"value":"Create a New Authentication (optional)","id":"create-a-new-authentication-optional","depth":3},{"value":"Identify the existing Authentication ID","id":"identify-the-existing-authentication-id","depth":3},{"value":"Using an Existing Authentication","id":"using-an-existing-authentication","depth":3},{"value":"Examples of Reusing an Authentication in New Job and Workflow Configurations","id":"examples-of-reusing-an-authentication-in-new-job-and-workflow-configurations","depth":4},{"value":"Examples of New Workflow Configurations","id":"examples-of-new-workflow-configurations","depth":4},{"value":"s3_v2_guessed.yml file","id":"s3_v2_guessedyml-file","depth":3},{"value":"Example of Reusing an Authentication in an Existing Job or Workflow Configuration","id":"example-of-reusing-an-authentication-in-an-existing-job-or-workflow-configuration","depth":4}],"frontmatter":{"seo":{"title":"Reusing an Existing Authentication"}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/integration-hub/authentications/reusing-an-existing-authentication","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}