Reputation: 2325
I recently download IBM Watson personality insight demo (nodejs). when i am running that demo and trying to analyze any person that is already in list than it throws a error. Here is the UI of that demo
I don't know why is it coming. please guide me accordingly. Here is an error
Upvotes: 0
Views: 201
Reputation: 1439
Double check your .env file.
IBM Cloud is migrating to token-based Identity and Access Management (IAM) authentication.
With some service instances, you authenticate to the API by using IAM. You can pass either a bearer token in an Authorization header or an API key. Tokens support authenticated requests without embedding service credentials in every call. API keys use basic authentication. Learn more about IAM.
If you pass in an API key, use apikey for the username and the value of the API key as the password.
In other instances, you authenticate by providing the username and password for the service instance. For more information, see Service credentials for Watson services.
To find out which authentication to use, view the service credentials by clicking the service instance on the Dashboard.
Source : apidocs/personality-insights
So in your .env
file the service credentials could either be
# service credentials
PERSONALITY_INSIGHTS_USERNAME= <YOUR USERNAME>
PERSONALITY_INSIGHTS_PASSWORD= <YOUR PASSWORD>
PERSONALITY_INSIGHTS_URL=<SERVICE URL>
Or
# service credentials
PERSONALITY_INSIGHTS_IAM_APIKEY= <YOUR API KEY>
PERSONALITY_INSIGHTS_URL= <SERVICE URL>
Upvotes: 0
Reputation: 9359
As the error says, you are not authorised. You need to create a personality insights service, and set the credentials.
You can't use the default settings.
Upvotes: 1