forked from Elocin-Anagram/TwitchStreamMarker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Marker.HTML
27 lines (22 loc) · 876 Bytes
/
Marker.HTML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<HTML>
<body>
<! –– Fill in the following: Line 11 your Client-ID. Line 12 Oath token. Line 16 user_id. Will create a stream marker on twitch on load of page if steamer is live. Special thanks to the Twitch dev discord esp @Dist @BarryCarlyon @Marenthyu @foodz who helped me learn how to do this. A special special thanks to @BarryCarlyon who helped me set up the code, and was very patient with me.
––>
<script>
fetch('https://api.twitch.tv/helix/streams/markers', {
method: 'POST',
headers: {
'Client-ID': 'Client-ID',
'Authorization': 'Bearer Oath token',
'Content-Type': 'application/json'
},
body: JSON.stringify({
user_id: 'user_id'
})
})
.then(resp => { return resp.json(); })
.then(resp => { console.log(resp); })
.catch(err => { console.log(err) })
</script>
</body>
</HTML>