Service credentials for Watson services

Service credentials for an IBM Watson™ service provide authentication to a service in IBM® Bluemix®. A set of credentials can be used only with the service for which they are created.

You use the service credentials differently depending on the programming model you use. For details, see Programming models for Watson services.

Service credentials are HTTP basic authentication credentials for a specific Watson service.

Getting credentials manually

You can find the service credentials from the Bluemix web interface.

  1. Log in to Bluemix.
  2. Select Catalog and then Watson to get to the list of services
  3. Select a service, and then create an instance of the service by clicking Create.
  4. Select Service Credentials and then View Credentials on the service dashboard.

Tip: See Getting started for a visual walkthrough of this process

Updating service credentials

You can get service credentials for an existing service instance from the Bluemix interface:

  1. Log in to Bluemix.

  2. Select your service that you want to update from your Bluemix dashboard.

  3. Under Service Credentials, select the credential you want to delete.

  4. Click New Credential, and then Add in the "Add New Credential" window.

  5. View and copy the new credentials.

  6. Make sure that you use the new credentials in your applications:

    • If your application obtains its credentials programmatically, stop and restart your application.
    • If your credentials are embedded in your application code, update the code and relaunch the application.

For details about how to update an application with new credentials with minimal downtime, see Updating Apps in the Bluemix documentation.

Credentials in Bluemix Dedicated

In a Bluemix Dedicated instance, service tiles are implemented so that only one tile is permitted per service in an organization.

Bluemix Dedicated users must follow these steps to refer to a service in their own workspace:

  1. Create a set of credentials for the reference tile for the service that they want to use.

  2. Create a custom user-provided service that uses those credentials:

    1. Use the Bluemix interface to select the tile for the service that you want to use, and create a set of credentials for the service. The credentials are created in JSON format and contain separate fields for the URL at which to communicate with the service and for the username and password to use with that service.
    2. Use the cf cups (create user-provided service) command to create a custom service that is bound to those credentials. For example, given these credentials,

      "url": "",
      "username": "583b2e88-c80d-4ec0-93c1-98239f805146",
      "password": "RuytRliRvoFN"

    create a custom user-provided service instance named Personality-Insights-Std:

    cf cups Personality-Insights-Std -p "\"583b2e88-c80d-4ec0-93c1-98239f805146\":\"RuytRliRvoFN\""

    Important: Make sure to specify the username and password as a single string inside double quotation marks and separated by a colon. Also enclose both the username and password strings with double quotation marks, and escape them with a backslash.

Using apps with Bluemix Dedicated

The Watson sample apps and starter kits on GitHub include a Use in Bluemix button. These buttons won't work in Bluemix Dedicated installations because they refer to the public Bluemix environment.

To use sample applications and starter kits in Bluemix Dedicated environments:

  1. In the instructions for the application, make sure that the manifest.yml file that you create uses the name of the service that you created with the cf cups command.
  2. In those same instructions, instead of executing the cf create-service command, use a cf cups command. However, if you created a custom user-provided instance of your service, you don't need to create it again to use it with the sample application or starter kit.