Created
October 28, 2020 07:22
-
-
Save AeonFX/3e211905b17499b24ab7c1c0e3c47975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "96aec7b1-839e-4fdf-b854-84b0396ee357", | |
"name": "Twitch", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "Twitch log-in get oauth token", | |
"event": [ | |
{ | |
"listen": "test", | |
"script": { | |
"id": "db03cc47-72ac-4435-b6ed-71bc6c9d5025", | |
"exec": [ | |
"\r", | |
"const responseJson = pm.response.json();\r", | |
"pm.globals.set(\"twitchAuthToken\", responseJson.access_token);" | |
], | |
"type": "text/javascript" | |
} | |
} | |
], | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"content-type": true, | |
"user-agent": true | |
} | |
}, | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "User-Agent", | |
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0", | |
"type": "text" | |
}, | |
{ | |
"key": "Content-Type", | |
"value": "text/plain;charset=UTF-8", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\"username\":\"{{username}}\",\"password\":\"{{password}}\",\"client_id\":\"kimne78kx3ncx6brgo4mv6wki5h1ko\",\"undelete_user\":false}", | |
"options": { | |
"raw": { | |
"language": "text" | |
} | |
} | |
}, | |
"url": { | |
"raw": "https://passport.twitch.tv/login", | |
"protocol": "https", | |
"host": [ | |
"passport", | |
"twitch", | |
"tv" | |
], | |
"path": [ | |
"login" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "api.twitch channel get access token", | |
"protocolProfileBehavior": { | |
"disabledSystemHeaders": { | |
"user-agent": true | |
} | |
}, | |
"request": { | |
"auth": { | |
"type": "noauth" | |
}, | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "User-Agent", | |
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0", | |
"type": "text" | |
}, | |
{ | |
"key": "Access-Control-Request-Method", | |
"value": "GET", | |
"type": "text" | |
}, | |
{ | |
"key": "Access-Control-Request-Headers", | |
"value": "uthorization,client-id,content-type,twitch-api-token,x-device-id,x-requested-with", | |
"type": "text" | |
}, | |
{ | |
"key": "origin", | |
"value": "https://www.twitch.tv", | |
"type": "text" | |
}, | |
{ | |
"key": "referer", | |
"value": "https://www.twitch.tv/xqcow", | |
"type": "text" | |
}, | |
{ | |
"key": "sec-fetch-dest", | |
"value": "empty", | |
"type": "text" | |
}, | |
{ | |
"key": "sec-fetch-mode", | |
"value": "cors", | |
"type": "text" | |
}, | |
{ | |
"key": "sec-fetch-site", | |
"value": "same-site", | |
"type": "text" | |
}, | |
{ | |
"key": "x-requested-with", | |
"value": "XMLHttpRequest", | |
"type": "text" | |
} | |
], | |
"url": { | |
"raw": "https://api.twitch.tv/api/channels/xqcow/access_token?need_https=true&oauth_token={{twitchAuthToken}}&player_backend=mediaplayer&player_type=frontpage&platform=web", | |
"protocol": "https", | |
"host": [ | |
"api", | |
"twitch", | |
"tv" | |
], | |
"path": [ | |
"api", | |
"channels", | |
"xqcow", | |
"access_token" | |
], | |
"query": [ | |
{ | |
"key": "need_https", | |
"value": "true" | |
}, | |
{ | |
"key": "oauth_token", | |
"value": "{{twitchAuthToken}}" | |
}, | |
{ | |
"key": "player_backend", | |
"value": "mediaplayer" | |
}, | |
{ | |
"key": "player_type", | |
"value": "frontpage" | |
}, | |
{ | |
"key": "platform", | |
"value": "web" | |
} | |
] | |
} | |
}, | |
"response": [] | |
} | |
], | |
"protocolProfileBehavior": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment