-
I know you're going to eventually have a feature that I'm interested in, ala #147 But in the meantime, I'm trying to implement it along with my script discussed here: #186 I understand oauth needs to take me Elsewhere to authorize, and then send its response to a Return URI. I guess I'm wondering, does mean I must stand up even the most minimal little server ( Here's what I've got, and #!/usr/bin/env bash
# using httpie and jq
# https://dev.twitch.tv/docs/api/reference#get-followed-streams
#1 - pukes out {"access_token":"blahblahblah","expires_in":5609748,"token_type":"bearer"}
TOKEN=$(https -b POST \
"https://id.twitch.tv/oauth2/token?client_id=$TWITCH_CLIENT_ID&client_secret=$TWITCH_CLIENT_SECRET&grant_type=client_credentials" \
'Content-Type: application/x-www-form-urlencoded' | jq '.access_token')
#2 - Is it definitely required on my part to stand up a little web server to receive this request?
# Do I have _any_ other viable options?
https GET "https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=$CLIENT_ID&redirect_uri=http://localhost:3000&scope=user%3Aread%3Afollows"
#3 - this'll work fine when i tackle #2
https GET "https://api.twitch.tv/helix/streams/followed?user_id=$TWITCH_USER_ID" \
"Authorization: Bearer $TOKEN" \
"Client-Id: $TWITCH_CLIENT_ID" Any guidance would be appreciated. (If you saw me hop into the Python Discord and ask this, it was only afterwords I realized "this is the wrong way to go about this" and left, to post it here) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Greetings. I'll look into this soon (am working on other project), thank you for the post. |
Beta Was this translation helpful? Give feedback.
Tracking in #147, being implemented in #419.