> ## Documentation Index
> Fetch the complete documentation index at: https://developer.watson-orchestrate.ibm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting credentials for your environments

To change your environments in the ADK, you must provide the ADK with your service instance URL and your watsonx Orchestrate API key. Currently, watsonx Orchestrate as a service (SaaS) is deployed in both IBM Cloud and AWS. Depending on which environment you have a valid account, the process to retrieve this information can vary.

## IBM Cloud

To connect to IBM Cloud, you need both the **service instance URL** and an **API key** of your watsonx Orchestrate instance.

<Note>
  Don't use the credentials that you get from the IBM Cloud resources page. Use the following procedure to get the appropriate API key and service instance URL.
</Note>

<Steps>
  <Step>
    Log in to your watsonx Orchestrate instance.
  </Step>

  <Step>
    Click your user icon on the top right and click **Settings**.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/user_settings_ibm_cloud.png" />
    </Frame>
  </Step>

  <Step>
    Go to the **API details** tab.
  </Step>

  <Step>
    Copy the service instance URL.
  </Step>

  <Step>
    Click the **Generate API key** button.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/ibmcloud_credentials.png" />
    </Frame>
  </Step>

  <Step title="Generate an API Key">
    The page redirects you to the IBM Cloud Identity Access Management center. Click **Create** to create a new API Key.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/ibmcloud_iam.png" />
    </Frame>
  </Step>

  <Step>
    Enter a name and a description for your API Key.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/ibmcloud_create_apikey.png" />
    </Frame>
  </Step>

  <Step>
    Copy the API key and store it in a safe vault.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/ibmcloud_copy_apikey.png" />
    </Frame>
  </Step>

  <Step>
    Add and activate your environment with the ADK CLI:

    ```bash BASH theme={null}
    orchestrate env add -n <environment-name> -u <service-instance-url> --type ibm_iam --activate
    ```

    <Note>
      **Note:**

      You can set any name you prefer for the environment.
    </Note>

    For more information, see [Configuring your environments](https://developer.watson-orchestrate.ibm.com/environment/initiate_environment).
  </Step>
</Steps>

## AWS

To connect to an instance hosted on AWS, follow these steps:

<Steps>
  <Step>
    Log in to your watsonx Orchestrate instance.
  </Step>

  <Step>
    Click your user icon on the top right and click **Settings**.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/user_settings.png" />
    </Frame>
  </Step>

  <Step>
    Go to the **API details** tab.
  </Step>

  <Step>
    Copy the service instance URL.
  </Step>

  <Step>
    Click the **Generate API key** button and copy the key.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/ibm-2e3153bf/_releases/assets/production_import/aws_credentials.png" />
    </Frame>

    <Note>
      * API keys are not retrievable and can't be edited or deleted. Make sure to store your API keys in a safe location after you generate a new API key.
      * You are limited to 10 API keys in this environment. If you have no more available keys, contact [IBM Support](https://ibm.com/mysupport) for further assistance.
    </Note>
  </Step>

  <Step>
    Add and activate your environment with the ADK CLI:

    ```bash BASH theme={null}
    orchestrate env add -n <environment-name> -u <service-instance-url> --type mcsp --activate
    ```

    <Note>
      **Note:**

      You can set any name you prefer for the environment.
    </Note>

    For more information, see [Configuring your environments](https://developer.watson-orchestrate.ibm.com/environment/initiate_environment).
  </Step>
</Steps>

## On-premises

For on-premises environments, you can authenticate using one of two methods:

* **API Key**

  Use the API key that authenticates your user in the on-premises watsonx Orchestrate environment.

* **Username** and **Password**

  Use your username and password credentials to authenticate in the on-premises watsonx Orchestrate environment.

<Note>
  **Note:**
  You can only use one authentication method at a time. If you try to authenticate using both methods simultaneously, an authentication error occurs.
</Note>
