How to get username & password for Watson Text to

2019-05-14 19:42发布

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.

2条回答
成全新的幸福
2楼-- · 2019-05-14 20:22

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
查看更多
欢心
3楼-- · 2019-05-14 20:34

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.

查看更多
登录 后发表回答