Problem with curl vs Python

Hi! I try to get info about my stream and all work with curl requests:
curl -i -H 'Accept: application/vnd.twitchtv.v3+json' -H 'Client-ID: myApiKey' 'https://api.twitch.tv/kraken/channels/otlet'

and this work, but when i use Python requests i get
url = ‘https://api.twitch.tv/kraken/channels/otlet
headers = {
‘Accept’: ‘application/vnd.twitchtv.v3+json’,
‘Client-ID’: settings.TWITCH_API_KEY
}
r = requests.post(url, headers=headers)
then i get only:
{“error”:“Not Found”,“status”:404,“message”:null}

Someone have idea what i do wrong?

You are POSTing when you should be GETing

2 Likes

Thanks m8. I’m dumb -_-

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.