Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Incorrectly listed requirement for Send Extension Chat Message Endpoint #577

Closed
Marenthyu opened this issue Feb 19, 2022 · 2 comments
Labels
product: docs Documentation on dev.twitch.tv/docs

Comments

@Marenthyu
Copy link
Member

Marenthyu commented Feb 19, 2022

Brief description
In the Docs, it is written A signed JWT must include the role and channel_id fields for the Send Extension Chat Message Endpoint. This is not true, as the channel_id field seems to be completely ignored when calling this Endpoint. Instead, the value of user_id seems to be required and used, as the Schema dictates. (Note that it does not need to match the broadcaster_id, as it just denotes the Extension owner, not the target broadcaster)

Expected documentation
It should list user_id as the required matching field and not mention channel_id, as it is ignored.

Screenshots
https://lowee.de/chrome_2022-02-19_20-22-44.png

Additional context or questions
See also Discord Discussion: https://discord.com/channels/504015559252377601/523676096277905419/944671207909908610
@BarryCarlyon used his testing code to verify the above information.

@Marenthyu Marenthyu added the product: docs Documentation on dev.twitch.tv/docs label Feb 19, 2022
@BarryCarlyon
Copy link
Contributor

BarryCarlyon commented Feb 19, 2022

Authorization
Signed JWT created by an Extension Backend Service (EBS), following the requirements documented in [Signing the JWT](https://dev.twitch.tv/docs/extensions/building/#signing-the-jwt). A signed JWT must include the role and channel_id fields documented in [JWT Schema](https://dev.twitch.tv/docs/extensions/reference/#jwt-schema). role must be set to "external" and channel_id must match the broadcaster ID in the request URL.

Should read just

Authorization
Signed JWT created by an Extension Backend Service (EBS), following the requirements documented in [Signing the JWT](https://dev.twitch.tv/docs/extensions/building/#signing-the-jwt).

As the first linked to section is correct. And the second sentence is just superflous

And the sentence

A signed JWT must include the role field documented in [JWT Schema](https://dev.twitch.tv/docs/extensions/reference/#jwt-schema), and role must be set to "external".

On any of the JWT basend endpoints is generaly superflous.
Since if you can do external or "the JWT passed from the frontend to an EBS that belongs to the broadcaster"

This applies to PubSub (channel/channel whisper), Config Service (broadcaster segement), Extension Chat when the ChannelID used for these endpoints is the same as the channelID being talked to (in query params) and the JWT was generated by Twitch (not external)

@scott-a-white
Copy link

Thanks for reporting the issue. Fixed: https://dev.twitch.tv/docs/api/reference#send-extension-chat-message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: docs Documentation on dev.twitch.tv/docs
Projects
None yet
Development

No branches or pull requests

3 participants