I am trying to integrate Watson assistant with my website. When I try to get a token for authentication I get this error.
"code" : 403 , "error" : "Forbidden" , "description" : "2018-09-11T13:37:57-05:00, Error ERCD-NOCONFIG occurred when accessing https://stream.watsonplatform.net/conversation/api, Tran-Id: stream01-1269192369 - "
With the ERP system I am using I cannot use node.js or CURL, hence I am using an HTTP get request. I am sure my credentials are correct, is it the way they are formatted, or the incorrect url? I have tried multiple urls including "https://gateway.watsonplatform.net/authorization/api/v1/token", and "https://gateway.watsonplatform.net/assistant/api"
var utoken;
var header=[];
var user= {
"xxxxxxxxxxxxxxx":"xxxxxxxx"
}
// use JSON.stringify() in order to correctly format
user = JSON.stringify(user);
header['Content-Type']='application/json';
try{
var response=https.get({
url: "https://stream.watsonplatform.net/assistant/api",
headers:header,
user:user
});
//capture the utoken
utoken = JSON.parse(response.body);
log.debug({
title: 'utoken',
details: utoken
});
console.log(response);
}
catch(er01){
log.debug({
title: 'error',
details: 'token error'
});