Skip to content

Commit 64d8ee1

Browse files
dpopp07germanattanasio
authored andcommitted
docs: fix authentication error on live examples
1 parent 01304b7 commit 64d8ee1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ var sttAuthService = new AuthorizationV1(
8989
{
9090
username: process.env.SPEECH_TO_TEXT_USERNAME, // or hard-code credentials here
9191
password: process.env.SPEECH_TO_TEXT_PASSWORD,
92-
iam_apikey: process.env.SPEECH_TO_TEXT_IAM_APIKEY, // if using an RC service
92+
// iam_apikey: process.env.SPEECH_TO_TEXT_IAM_APIKEY, // if using an RC service
9393
url: process.env.SPEECH_TO_TEXT_URL ? process.env.SPEECH_TO_TEXT_URL : SpeechToTextV1.URL
9494
},
9595
vcapServices.getCredentials('speech_to_text') // pulls credentials from environment in bluemix, otherwise returns {}
9696
)
9797
);
9898
app.use('/api/speech-to-text/token', function(req, res) {
99-
sttAuthService.getToken({}, function(err, token) {
99+
sttAuthService.getToken(function(err, token) {
100100
if (err) {
101101
console.log('Error retrieving token: ', err);
102102
res.status(500).send('Error retrieving token');
@@ -119,7 +119,7 @@ var ttsAuthService = new AuthorizationV1(
119119
)
120120
);
121121
app.use('/api/text-to-speech/token', function(req, res) {
122-
ttsAuthService.getToken({}, function(err, token) {
122+
ttsAuthService.getToken(function(err, token) {
123123
if (err) {
124124
console.log('Error retrieving token: ', err);
125125
res.status(500).send('Error retrieving token');

0 commit comments

Comments
 (0)