I'm trying to make a simple Discord Bot that posts when a streamer goes live but I'm not sure how to use the Twitch webhooks without having a website? Is it possible to handle it all in a Python script?
webhookurl = "https://api.twitch.tv/helix/webhooks/hub/"
payload = {"hub.mode":"subscribe",
"hub.topic":"https://api.twitch.tv/helix/users/streams?user_id=27942990",
"hub.callback":url,
"hub.lease_seconds":"0"
}
header = {"Content-Type":"application/json", "Client-ID": clientid}
req = requests.post(url, headers=header, data = payload)
resp = req.json()
print(resp)
Not sure what to put as the callback URL since I don't have a website to respond.
I'm using Python 3.6
Side note: I can find out if a channel is live but Twitch recommends the webhooks for checking when a stream goes live and I just want to try learn this.