Bluemix - Natural Language Classifier credentials in the Questions on classifier demo

166 Views Asked by At

I'm trying to use IBM Watson Natural language Classifier but I can't proceed and load my answers. For some reason, username and password aren't working all the time.

This one executed fine:

 curl -u username:password -F [email protected] -F
 training_metadata="{\"language\":\"en\",\"name\":\"my_classifier\"}"
 "https://url/v1/classifiers"

But when I try to execute the following command, it doesn't work:

 curl -u username:password -X POST -H "Content-Type: application/json"
 -d @questions-with-classifier-ega-war/target/classes/answers.json http://yourAppName.mybluemix.net/api/v1/manage/answer

It just asks for the user and password again and again. It is the same password that just worked in the first curl command.

Thanks in advance!

1

There are 1 best solutions below

0
On

I think you are confusing the service credentials (the one you use in the first command) with the credentials used to manage the database in one of the sample applications "Questions on Classifier" (see pom.xml).

In order to run your second command make sure you use the credentials from the pom.xml in your root directory