I am trying to create an EventSub subscription for a python bot by following Twitch’s API documentation, but I’m getting an invalid transport
error and there’s no activity on my ngrok endpoint when I call the post request. The transport section of the body seems pretty straightforward, am I wrong or have I done something else incorrectly? Thanks very much for any assistance.
headers = {
'Client-ID': config['CLIENT_ID'],
'Authorization': 'Bearer ' + config['ACCESS_TOKEN']
}
body = {
'type': 'channel.follow',
'version': '1',
'condition': {
'broadcaster_user_id': config['BROADCASTER_ID']
},
'transport': {
'method': 'webhook',
'callback': ngrok_endpoint,
'secret': secret
}
}
r = requests.post(
'https://api.twitch.tv/helix/eventsub/subscriptions',
body,
headers=headers
)
Returns: {'error': 'Bad Request', 'status': 400, 'message': 'invalid transport'}