Skip to content

Commit a8c2206

Browse files
authored
Merge pull request #787 from watson-developer-cloud/update-vis-rec-examples
Update vis rec examples
2 parents 50971c0 + e48679d commit a8c2206

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ Watson services are migrating to token-based Identity and Access Management (IAM
8484

8585
- With some service instances, you authenticate to the API by using **[IAM](#iam)**.
8686
- In other instances, you authenticate by providing the **[username and password](#username-and-password)** for the service instance.
87-
- Visual Recognition uses a form of [API key](#api-key) only with instances created before May 23, 2018. Newer instances of Visual Recognition use [IAM](#iam).
8887

8988
### Getting credentials
9089
To find out which authentication to use, view the service credentials. You find the service credentials for authentication the same way for all Watson services:
@@ -148,19 +147,6 @@ var discovery = new DiscoveryV1({
148147
});
149148
```
150149

151-
### API key
152-
153-
**Important**: This type of authentication works only with Visual Recognition instances created before May 23, 2018. Newer instances of Visual Recognition use [IAM](#iam).
154-
155-
```javascript
156-
var VisualRecognitionV3 = require('watson-developer-cloud/visual-recognition/v3');
157-
158-
var visualRecognition = new VisualRecognitionV3({
159-
version: '{version}',
160-
api_key: '{api_key}'
161-
});
162-
```
163-
164150
### Sending request headers
165151

166152
Custom headers can be passed with any request. Each method has an optional parameter `headers` which can be used to pass in these custom headers, which can override headers that we use as parameters.

examples/visual_recognition.v3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var VisualRecognitionV3 = require('watson-developer-cloud/visual-recognition/v3'
44
var fs = require('fs');
55

66
var visualRecognition = new VisualRecognitionV3({
7-
api_key: 'INSERT YOUR API KEY HERE',
7+
iam_apikey: 'INSERT YOUR IAM API KEY HERE',
88
version: '2016-05-20'
99
});
1010

0 commit comments

Comments
 (0)