Skip to content

Commit 6429bfc

Browse files
authored
Merge pull request #946 from watson-developer-cloud/SirSpidey-patch-vr-iam
Update info about Visual Recognition
2 parents 9f8d2cf + 3d8c12d commit 6429bfc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Java client library to use the [Watson APIs][wdc].
1515
* [Gradle](#gradle)
1616
* [Usage](#usage)
1717
* [Running in IBM Cloud](#running-in-ibm-cloud)
18+
* [Visual Recognition](#visual-recognition)
1819
* [Authentication](#authentication)
1920
* [Username and Password](#username-and-password)
2021
* [API Key](#api-key)
@@ -126,6 +127,13 @@ credentials; the library will get them for you by looking at the [`VCAP_SERVICES
126127
When running in IBM Cloud (or other platforms based on Cloud Foundry), the library will automatically get the credentials from [`VCAP_SERVICES`][vcap_services].
127128
If you have more than one plan, you can use `CredentialUtils` to get the service credentials for an specific plan.
128129

130+
## Visual Recognition
131+
132+
The process for authenticating with Visual Recognition has changed:
133+
134+
- For new service instances, authenticate by using IAM. See [Using IAM](#using-iam). Also set the service URL by calling the `setEndpoint()` method of the service instance.
135+
- For service instances created before May 23, 2018, authenticate by providing the API Key for the service instance. See [API Key](#api-key).
136+
129137
## Authentication
130138

131139
There are three ways to authenticate with IBM Cloud through the SDK: using a `username` and `password`, using an `api_key`, and with IAM.
@@ -155,7 +163,7 @@ service.setUsernameAndPassword("<username>", "<password>");
155163

156164
### API Key
157165

158-
_Note: This version of instantiation only works with Visual Recognition, as it's the only service that uses an API key rather than a username and password._
166+
_Important: Instantiation with API key works only with Visual Recognition service instances created before May 23, 2018. Visual Recognition instances created after May 22 use IAM._
159167

160168
```java
161169
// in the constructor

0 commit comments

Comments
 (0)