Send twitch eventsub requests

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 2 years ago
parent 7b1e6558c6
commit bdda6143e1
  1. 5
      src/sig/client.java

@ -81,12 +81,13 @@ public class client {
HashMap<String,Object> transport = new HashMap<>(); HashMap<String,Object> transport = new HashMap<>();
condition.put("broadcaster_user_id","39404108"); condition.put("broadcaster_user_id","39404108");
transport.put("method","webhook"); transport.put("method","webhook");
transport.put("callback","https://projectdivar.com/twitch/streamonline"); transport.put("callback","https://projectdivar.com/twitch/streamoffline");
transport.put("secret",SECRET); transport.put("secret",SECRET);
obj.put("type","stream.online"); obj.put("type","stream.offline");
obj.put("version","1"); obj.put("version","1");
obj.put("condition",condition); obj.put("condition",condition);
obj.put("transport",transport); obj.put("transport",transport);
//obj.put("challenge","testKey");
GETRequest res = new GETRequest("https://api.twitch.tv/helix/eventsub/subscriptions",30000,"Authorization","Bearer vk5jyguposazau2gc1e0kjktv5xc4y","Client-Id","otppg8l1x7xbrfnqex1np1qba47mzf"); GETRequest res = new GETRequest("https://api.twitch.tv/helix/eventsub/subscriptions",30000,"Authorization","Bearer vk5jyguposazau2gc1e0kjktv5xc4y","Client-Id","otppg8l1x7xbrfnqex1np1qba47mzf");
System.out.println(((HttpResponse<String>)res.run()).body()); System.out.println(((HttpResponse<String>)res.run()).body());
/* /*

Loading…
Cancel
Save