Sorry if this turns out to be the most simple of simple questions, I’m struggling and need help!
I’ve setup what I believe to be a working webhook with the Twitch API. To test, I am subscribing to a follow from an id (which is my own Twitch account).
My question is, where in the POST is the data? I’m expecting to find something similar to:
{
"data":
[{
"from_id":"1336",
"to_id":"1337",
"followed_at": "2017-08-22T22:55:24Z"
}]
}
but I can’t work out where that exists in the request I get back (which is large).
Here is my code:
app.get('/api/twitch/callback/', (request, response) => {
const challenge = request.query['hub.challenge']
console.log(request.query['hub.topic'])
console.log(request.params)
console.log(request.query)
console.log(challenge)
response.set({
'Access-Control-Allow-Origin': '*',
'x-timestamp': Date.now(),
'x-sent': true,
})
response.status(200).send(challenge)
})
app.post('/api/twitch/callback/', (request, response) => {
console.log(request)
})