Hello, I’m developing a desktop app and an exstension and I’ve some question about how to link them. I’m able to login with twitch from my app using Implicit grant flow and got an access token using the extenstion client_id. Since I want to test if this exstension would be good I don’t have and don’t want to use any external server / service other that Twitch systems right now. So the questions are:
Right now I use redirect on localhost:PORT on my desktop app, I’m able to extract the access token and save it on disk. Is this good or for security reason is mandadory to use an external server and doing server-to-server requests to Twitch APIs?
There is an endpoint or a PubSub or an EventSub that can I use to send data from my app to extension or am I obliged to create my own event system (like Kafka)? Example scenario: broadcaster set some data on the app, it should notify all the extension active in that moment for that broadcaster.
Can channel points be used to redeem something in my extension like the bit system?
If you are needing to get a token from the broadcaster for scopes other than the subscriber read scope then you will need an oAuth flow yes, but you’d probably want the code flow not the implict flow so you can get a refreshable token.
Channel Points would require a server/backend in order to consume the chnanel points usage event.
This is generally not good practice since if a user is behind a firewall that only allows SSL traffic on the SSL point you’ll run into issues. Let along localhost to me is my computer not yours. Removed as misread your usecase
Sure you can have the streamer install software on their computer for an extension, but then that software can’t talk to the Twitch API to send extension pubsub messaging as you’d leak your Extension Secret.
And if you want to use channel points, you’ll need a server in order to consume the events via eventsub. (yeah your desktop app could connect to EventSub Websockets to consume but then you can’t talk to your extension)
So you’ll want an EBS/External Server to start with, in my opinion.
Thx for reply. Now I see more clear all the system.
The desktop app is used by the streamer, the viewer will use the extension to interact with it.
The scenario is:
Streamer PC with my desktop App ← WebSocket (Twitch or my own systems) → Extension on Twitch streamer page
I know that the best environment is using my own servers, but I was wondering if I can use what twitch offers me since it is better distributed than what I could do by my self (with low-to-zero budget).
But I see that I need to use Extension Secret to access pubsub, so I definitely need to develop my own system and can’t put that secret on desktop app
All this comes from a simple wondering. I can use a server to do server-to-server communication, but that would be my single point of failure. So I need to add more server to distribute the loads and the price to get all this machines goes higher
@BarryCarlyon I’ve a question about Channel Points, I understand that there is no way to add product with cost in Channel Point (the API accept only bit amount or free), but I can create a custom channel point reward (that goes wiht all other channel rewards) via Twitch API. Some question about this:
There is a way to hide custom channel reward from the list (so I don’t mess the broadcaster list)?
Can I force redeem a custom channel point through api? A viewer click on a button and with some token I can trigger that reward
No, there’s no way for you to force users to spend channel points.
All you could do is have the user go through the list of rewards, click on the one created by your extension themselves, and have your extension listen for that redemption so that you can take some action within your Extension.
If a channel point rewards is hidden (disabled) then it cannot be used in the “channel point shop” as it is disabled
Channel Point Rewards can only be used in the “channel point shop” below the chat box
You’d consume redemption “purchases” via EventSub or polling the API, not a callback like bits products in extensions do. (But bits productions in extensions also have an API and EventSub to use as well0
Hello, I’ve other question about my first extension. Now I’ve a minimum EBS that I use as redirect after login to create an access token with Code so I can store user information like access token and its refresh token.
Right now I’m in local test mode and only my account can see the extension panel, how can I test the extension panel as viewer (logged with another account to test on broadcaster page)?
I see that bit in extension has a limit of 250 product in it, I wonder how sound alerts can manage all the sounds with their own price. As I can think is that they have only a catalogue of generic bit prices (5 -10 - 100) and then they bind a specific user sound to a generic price sku, but the extension.bits_transaction.create EventSub will send only info about generic bit product and not specific user sound