It’s only this when the viewer that is using the extension is the broadcaster.
It’s much safer to consider this data value as the opaque session id and save confusion.
Then use the channel_id returned in onAuthorized for your configuration calls.
See Extensions Reference | Twitch Developers → opaque_user_id for a good explanation.
Identifies the session using this JWT. Any token generated by your EBS should leave this field blank. When present, the value is interpreted as follows:
Values beginning with “U” are stable references to a Twitch account across sessions and channels. You can use them to provide persistent services to users.
Values beginning with “A” are transient references to an anonymous Twitch session; the user has not logged into the Twitch website. These values are not stable and should never be associated with persistent data. It is possible for them to represent different users over time. If your extension requires a stable user identity, your front-end interface should display an appropriate login request when this field does not begin with “U.”
Broadcasters’ tokens are set with “U” + their Twitch user IDs, to avoid confusing opaque IDs with user IDs when the broadcaster is a viewer.
Yeah looks like that API doesn’t validate the passed in ID is a real user ID or not.
So if you did a API call to save data into fred you’ll never be able to retrieve that on the front end. Since onChanged will only the same channel_id from onAuthorized to fetch configuration with