For details about using this service, see Getting started with Watson Assistance.
Note: if you build your own Watson chatbot, update the apikey
variable with your own Watson Assistant API information.
Set environment variables as recommended in Authentication information and then:
authenticator = IAMAuthenticator('{apikey}')
assistant = AssistantV2(
version='{version}',
authenticator=authenticator
)
Replace {apikey}
and {url}
with your service credentials.
curl -X {request_method} -u "apikey:{apikey}" "{url}/v2/{method}"
For example:
curl -X POST -u "apikey:{apikey}" --header "Content-Type:application/json" --data "{\"input\": {\"text\": \"Hello\"}}" "{url}/v2/assistants/{assistant_id}/message?version=2021-06-14"