400 Error when trying to subscribe to events

I use the Twitch API for EventSub and when running the request it throws a 400 error:

{"error":"Bad Request","status":400,"message":"unsupported eventsub transport method"} 

I could not find anything on how to fix this online. Here is my request:

requests.request("post", "https://api.twitch.tv/helix/eventsub/subscriptions", headers= { "Authorization": "Bearer authtoken", "Client-Id": "clientid" },
    data= { "type": "channel.follow", "version": "1", "condition": { "broadcaster_user_id": "599425049" }, "transport": { "method": "webhook", "callback": "https://twitchsite.loophole.site/eventsub", "secret": "secret" } })

Your data is not a JSON stringified body.

You posted a “form” not a “json body”

So JSON stringify your body

1 Like

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