2

I wanted to play with the text to speech service and forked the Official Sample available at - Text to Speech Demo.

The sample uses Username and password while the credentials provide only an API Key.

The service(s) appear to be moving over to using API keys (in favour of username and password which is reasonable).

There must be a way to provide configuration(in the create new credentials page) which would provide the username and password. I can't locate those magic parameters to pass.

Any pointers would be appreciated.

Manglu
  • 10,744
  • 12
  • 44
  • 57

2 Answers2

3

Instead of userName use the word apikey as written here and in the password the api key of your service. so your credentials should be as follow :

userName: "apikey"
password: your service api key
Mostafa Khaled
  • 372
  • 4
  • 16
  • Doing this allowed me to continue using an older version of the watson-developer-cloud/node-sdk as the newest for TTS seems to be having some number of problems actually working. – MasterOdin Jan 10 '19 at 16:08
1

As you spotted, the services have moved over to using API keys through the IBM Cloud IAM.

The watson-developer-cloud sdks will still work but you need to provide an iam_apikey value instead of the username and password. Hopefully the samples will be updated in the very near future.

Also make sure to check the credentials object provided to you by IBM Cloud as some of the service urls have changed and need to be explicitly declared using url in your config object.

Ed Shee
  • 931
  • 1
  • 7
  • 22
  • 1
    Thanks Ed. I still believe there is some config that can be used when we provision the service to get the userid and password. I recently figured out the same for the Cloud Object Storage. – Manglu May 28 '18 at 22:57
  • @Ed Shee I have signed up for Watson TTS but the credentials that I get from my dashboard are only url and API key, and not username and password. If I understand this post and comment correctly, the API key and URL should work just fine, but I get an error message that my credentials are null. Where do I get the old-fashioned username and password from? I do have such a pair, but for my Speech-to-Text, not TTS... Thanks –  Nov 22 '18 at 11:07