Possible to trigger test webhook events?

Is it possible to trigger a webhook event for testing purposes? Just trying to test my code that handles webhook events, but currently it looks like I need to create a secondary test account to do things from?

For followers, you can just listen to one of the most viewed channels and you’re almost guaranteed to get multiple events a minute. That said, you can just send a POST request with the data according to documentation to your endpoint yourself to test it too.

Thanks for the reply, @3ventic, Good idea about listening to high viewer channel.

In my tests, I’m receiving the challenge GET request and am responding with the provided challenge string. I assume my response is satisfying Twitch. Not sure how to tell.

I tried making a request to my handler and it works. I’m just not receiving events when I follow myself using my secondary dev account.

Will test on a high pop stream.

Well, @3ventic, I’m not sure how to proceed in debugging my situation. I’m currently testing the follow events by subscribing to follows to summit1g. I imagine he get gets a new follower every few minutes, at least. I’m not receiving any POST requests containing the event data, though.

In my code, I request the event subscription, to which I receive the 202 Accepted response. Twitch makes the GET request to my web hook callback URL, to which I respond with the challenge. After that, I never receive any events.

Here is a log of my request handler response, in which you can see I just respond with the challenge …

https://apitester.com/shared/runs/931ce0ad8cad472eaf08247e74419a23

Does this look correct?

Looks correct to me.

Here’s what I get:

$ CHID=29795919 TIMEOUT=60 ./app.js
> outgoing
<<< incoming

> REQUEST: https://api.twitch.tv/helix/webhooks/hub?hub.mode=subscribe&hub.topic=https%3A%2F%2Fapi.twitch.tv%2Fhelix%2Fusers%2Ffollows%3Fto_id%3D29795919&hub.callback=http%3A%2F%2Fsnip%2Fhelixtest&hub.lease_seconds=60
<<< 202 Accepted
<<< BODY:

<<< GET /helixtest?hub.challenge=KBlbaPC--9ltxuOvYklVluBw7DDGfTkq7AQfUVlb&hub.lease_seconds=60&hub.mode=subscribe&hub.topic=https%3A%2F%2Fapi.twitch.tv%2Fhelix%2Fusers%2Ffollows%3Fto_id%3D29795919
> RESPONSE: KBlbaPC--9ltxuOvYklVluBw7DDGfTkq7AQfUVlb

<<< POST /helixtest
> RESPONSE: OK
<<< BODY: {"data":{"from_id":"47245411","to_id":"29795919"},"id":"541fd66c-3178-5519-8852-84dd687782d7","timestamp":"2017-12-18T05:49:03.705Z","topic":"https://api.twitch.tv/helix/users/follows?to_id=29795919","type":"create"}

<<< POST /helixtest
> RESPONSE: OK
<<< BODY: {"data":{"from_id":"74932882","to_id":"29795919"},"id":"0aeedf3d-cced-5f17-9713-8d8c95cca79b","timestamp":"2017-12-18T05:49:21.56Z","topic":"https://api.twitch.tv/helix/users/follows?to_id=29795919","type":"create"}

<<< POST /helixtest
> RESPONSE: OK
<<< BODY: {"data":{"from_id":"185434434","to_id":"29795919"},"id":"f18ba51c-35b5-5fec-ae23-f7ad6c841fde","timestamp":"2017-12-18T05:49:37.796Z","topic":"https://api.twitch.tv/helix/users/follows?to_id=29795919","type":"create"}

<<< POST /helixtest
> RESPONSE: OK
<<< BODY: {"data":{"from_id":"185520630","to_id":"29795919"},"id":"5d1b048e-a521-5f4a-b082-563ffc657645","timestamp":"2017-12-18T05:49:56.193Z","topic":"https://api.twitch.tv/helix/users/follows?to_id=29795919","type":"create"}

I saw your issue was the default lease seconds of 0 in the other thread. Glad it’s solved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.