Watson Machine Learning & Node-RED

I was too fast asking..

It works like this:

var apikey="12345";
msg.headers = {'Content-Type': 'application/x-www-form-urlencoded'};

msg.payload = { 'apikey' : apikey,
'grant_type': 'urn:ibm:params:oauth:grant-type:apikey' };
return msg;