I have two problems related with the title:
- I was trying to follow this example: https://www.therelicans.com/wyhaines/twitch-eventsub-the-direct-approach-to-getting-started-with-it-3pia
in C#, By using HttpClient(), I was able to get an access token, but now I want to subscribe to
channel.follow event (following the step 1), but I don’t know How to create a POST request with objects as keys param.
I tried to do this
var requestContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("version", "1"),
new KeyValuePair<string, string>("type", "channel.follow"),
new KeyValuePair<string, string>("condition", "{\"broadcaster_user_id\": \"" + Config.DameInstancia().ClientID + "\"}"),
new KeyValuePair<string, string>("transport", "{\"method\": \"webhook\",\"callback\":\"https://example.com/webhooks/callback\",\"secret\": \"" + Config.DameInstancia().Secret + "\"}")
});
but it didn’t work xD. I keep getting the 401 status.
- I’ve tried to get the eventsub working in the “easy way”, using twitchlib.
This is the set-up I was trying to achieve with twitchlib https://githubmemory.com/repo/TwitchLib/TwitchLib.EventSub.Webhooks
but when I run it, it does nothing… so I guess I did something wrong…
It seems that the only thing i needed to do is to change the “supersecuresecret” for my twitch secret… but it is not working… I don’t really get the CallbackPath either… I undestand what it should do, but I don’t get How to set it up.