# Setting Your API Key and Endpoints Secrets are objects that contain sensitive data. Secrets allow you to access Treasure Data and pass sensitive information into the Console without compromising security. To do this, you’ll need to set your API Key and endpoint. You can access your API Key from [TD Console](https://console.treasuredata.com/). ## Prerequisites * Your [personal API Key](/products/my-settings/getting-your-api-keys) * The [endpoint](https://api-docs.treasuredata.com/en/overview/aboutendpoints/) corresponding to your site access ## Obtain your API Key and Endpoints 1. Open the Console 2. Select **My Settings > API Keys** ![](/assets/image-20200130-185736.ff12ed24ff0d8e54a80e777fa24c629a5707656a46c7787cd18b2b59fd5643f0.0bddf20e.png) 1. Copy your API Key ![](/assets/image-20200130-232001.a96cc85a6fdf70eb0a9e3ce6514809071db49b29a64b935e28c253ff445c51ea.0bddf20e.png) 1. Select the appropriate [endpoint](https://api-docs.treasuredata.com/en/overview/aboutendpoints/). For example: `https://api-workflow.us01.treasuredata.com` ## Set your API Key and Endpoint using the CLI 1. Open the terminal. 2. Open your workflow directory. ```bash cd /users//mydirectory ``` 1. Pass Secrets into the CLI using `--project` and `--set` commands to designate the project and set the API Key and endpoint. ```bash td wf secrets --project my_project --set apikey=1234565/abcdefghijklmnopqrstu --endpoint=https://api-workflow.treasuredata.com ``` The terminal displays the following results: ![](/assets/image-20200130-190854.7a28d747fffc8ddf0d8a4a0f82e88c41b707ef0859edda6da3ad1b2f2c751d6b.0bddf20e.png)