twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
73 stars 6 forks source link

Unable to start a commercial through Helix as channel's editor #544

Closed zneix closed 1 year ago

zneix commented 2 years ago

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 both channel_commercial and channel:edit:commercial. {"error":"Unauthorized","status":401,"message":"Missing scope: channel:edit:commercial or channel_commercial"}

I tried tokens with different scopes:

  1. channel_commercial
  2. channel:edit:commercial
  3. channel_commercial and channel:edit:commercial

and got the same response on each of these.

BarryCarlyon commented 2 years 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

zneix commented 2 years ago

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

BarryCarlyon commented 2 years ago

Then yeah this uservoice

https://twitch.uservoice.com/forums/310213-developers/suggestions/44183481-helix-start-commercial-endpoint-should-be-usable

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.