watson-developer-cloud/python-sdk

Personality insights API- Error 403

Closed this issue · 2 comments

I'm trying to use Personality Insights-m2 API to extract personality given text strings. When I call the profile() method I get this error:
immagine
I've used IAM authentication as described in readme.md
Here is my code:

from ibm_watson import PersonalityInsightsV3
import csv
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

# # Authentication via IAM
authenticator = IAMAuthenticator('********')
service = PersonalityInsightsV3(version='2017-10-13', authenticator=authenticator)
service.set_service_url('https://gateway.watsonplatform.net/personality-insights/api')

profile = service.profile(content = "hi guys how are you? hope everything's fine", accept = 'text/csv').get_result()

Could you please help me understanding what am I missing?

Hi @JArma19 , thanks a lot for sharing the issue. Your setup looks fine to me, can you make sure that service URL is correct. Also, which version of SDK are you using?

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.