API streams commercial

#topic is solved and can get deleted

Accept, client-id and authorization should be headers.

Length should be sent in the body as a JSON:

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: uo6dggojyb8d6soh92zknwmi5ej1q2' \
-H 'Authorization: OAuth cfabdegwdoklmawdzdo98xt2fo512y' \
-H 'Content-Type: application/json' \
-d '{"length": 30}' \
-X POST 'https://api.twitch.tv/kraken/channels/44322889/commercial'

You seem to have set everything as query string arguments.

Because you are sending them as post arguments instead of headers

client.DefaultRequestHeaders.Add("Accept", "application/*+xml;version=5.1");
client.DefaultRequestHeaders.Add("Authorization", "Basic " + authstring);

Seems to be the methods for setting headers

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