diff --git a/examples/server.js b/examples/server.js index 020f6ca1..b13271ea 100644 --- a/examples/server.js +++ b/examples/server.js @@ -89,14 +89,14 @@ var sttAuthService = new AuthorizationV1( { username: process.env.SPEECH_TO_TEXT_USERNAME, // or hard-code credentials here password: process.env.SPEECH_TO_TEXT_PASSWORD, - iam_apikey: process.env.SPEECH_TO_TEXT_IAM_APIKEY, // if using an RC service + // iam_apikey: process.env.SPEECH_TO_TEXT_IAM_APIKEY, // if using an RC service url: process.env.SPEECH_TO_TEXT_URL ? process.env.SPEECH_TO_TEXT_URL : SpeechToTextV1.URL }, vcapServices.getCredentials('speech_to_text') // pulls credentials from environment in bluemix, otherwise returns {} ) ); app.use('/api/speech-to-text/token', function(req, res) { - sttAuthService.getToken({}, function(err, token) { + sttAuthService.getToken(function(err, token) { if (err) { console.log('Error retrieving token: ', err); res.status(500).send('Error retrieving token'); @@ -119,7 +119,7 @@ var ttsAuthService = new AuthorizationV1( ) ); app.use('/api/text-to-speech/token', function(req, res) { - ttsAuthService.getToken({}, function(err, token) { + ttsAuthService.getToken(function(err, token) { if (err) { console.log('Error retrieving token: ', err); res.status(500).send('Error retrieving token');