Watson Assistant throws away webhook parameters

Viewed 218

I'm trying to get values from an API to a dialog node of Watson Assistant. Using the webhook option, the API call happens but the parameters i set are not used on the request.

parameter from dialog node

API code:

app.post('/', async (req, res) => {
  const result = await get('https://api.senior.com.br/' + req.query.link)
  console.log(result);
  res.json({result}) 
});

The request.url or the request.query.link returned is just '/', just when i make the call manually this variables have the parameter that I send.

2 Answers

I manage to get the parameter link from "req.body.link" (u.u), I just don't know why it doesn't appears on "req.query.link".

Related