Activating an API Key

Activate a deactivated API key so that requests using the selected key value authenticate again.

    1. On the API keys list page, select the API key that you want to work with. If you need help finding the list page for API keys, see Listing API keys.
    2. In Key names and expiration times, find the key state to change (for example, Key two state).
    3. Select the Actions menu (three dots) and select Activate.
    4. Confirm the activation.
  • To activate one secret of an API key, run the api-key set-api-key-state command, providing the API key OCID, the secret's key name, and set the state to ACTIVE:

    oci generative-ai api-key set-api-key-state [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • To activate one secret of an API key, run the SetApiKeyState operation, providing the API key OCID, the secret's key name, and set the state to ACTIVE.