Closed zneix closed 1 year ago
The API doesn't support this.
And what you refer to is undocumented kraken behaviour (editor can start ads via the API)
This is a feature request not a bug. So should be on uservoice. (You mis wrote your expected behaviour as thats what the API does)
I expect being able to start a commercial in a channel that I am broadcaster in, so most likely a 200 OK.
That should be
I expect being able to start a commercial in a channel that I am editor in, so most likely a 200 OK.
right?
And a uservoice does exist - https://twitch.uservoice.com/forums/310213-developers/suggestions/44183481-helix-start-commercial-endpoint-should-be-usable
it kinda looks like you have reported two different issues here and I know helix doesn't support an editors token only the broadcasters tokens for creating adverts
You mis wrote your expected behaviour as thats what the API does
yes, my bad, I meant to write editor instead of broadcaster. edited original post. sorry for confusion
Then yeah this uservoice
Superseeds this, as it is "not a bug".
As the old API never actually documented that an editor token works. And Helix doesn't support it at all, so the documentation is correct.
Brief description Upon trying to start a commercial on the channel where I'm an editor I get the following response:
{"error":"Bad Request","status":400,"message":"broadcaster_id and user_id do not match."}
How to reproduce Make the following call for the channel where you're an editor while it's live
curl -s -H "Authorization: Bearer foobar" -H "Client-ID: foobarbaz" -H "Content-Type: application/json" -X POST "https://api.twitch.tv/helix/channels/commercial" -d '{"broadcaster_id": "97916945", "length": 30}' | jq
Expected behavior I expect being able to start a commercial in a channel that I am editor in, so most likely a 200 OK.
Screenshots N/A
Additional context or questions I called the endpoint first with a token that has only
channel_commercial
scope and then with another that had bothchannel_commercial
andchannel:edit:commercial
. {"error":"Unauthorized","status":401,"message":"Missing scope: channel:edit:commercial or channel_commercial"}I tried tokens with different scopes:
channel_commercial
channel:edit:commercial
channel_commercial
andchannel:edit:commercial
and got the same response on each of these.