Explanation of how configuration works?

I am wondering how configuration works, or more specifically where permanent configuration is supposed to be saved.

If I create an extension where a streamer needs to enter their Steam ID in order to display some Steam profile information in the extension then I need to save that Steam ID for each streamer. Do I need to save that somewhere on my own hosting, or is there a way to save it on Twitch’s back end? Should I be setting up a database on my own hosting with a table of streamer Twitch IDs and their Steam IDs for this example?

Thanks - I appreciate any guidance in this area.

not a twitch dev, but based on documentation right now you have to do it through you own hosting.
You would use their API endpoint if you want to block wrongly configured apps (you have to tell twitch if config is ok to go)

Twitch hosted config is on the todo list: https://trello.com/c/88minYsr/22-extensions-configuration-service
I would guess we will get it at some point, hopefully not to long from now.

1 Like

Thanks for the response. Given that that Trello task exists it seems pretty clear it is not something currently possible. As you say - hopefully this is something which comes soon

1 Like

Nah you can do it now, that trello card is about storing the configuration in question twitch side.

You can store the configuration you want in your EBS, provide a form in a config panel that collects SteamID and store wthat with the channel ID.

When you have both then you tell Twitch Extension API all is good.

For example:

Results in:

So Casters goes to config, which Posts back to your EBS.

Then you do use:

And call:

PUT https://api.twitch.tv/extensions///required_configuration?channel_id=

Using the example

curl -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MDIyOTg3ODksInVzZXJfaWQiOiIyNzQxOTAxMSIsInJvbGUiOiJleHRlcm5hbCJ9.sKjspl1jw0XGcpjF8vo2IcS2dQLQU_rSsmRCnrohCP4' \
-H 'Client-Id: pxifeyz7vxk9v6yb202nq4cwsnsp1t' \
-H 'Content-Type: application/json' \
-d '{"required_configuration": "hassteam"}' \
-X PUT https://api.twitch.tv/extensions/pxifeyz7vxk9v6yb202nq4cwsnsp1t/0.0.1/required_configuration?channel_id=27419011

So in summary:

  • You configure your extension to have “hassteam” as the required configuration
  • Caster installs your Extension
  • Caster is told to go to configuration page
  • Caster enters SteamID, which posts to your EBS/backend server
  • Backend Stores SteamID and ChannelID
  • Backend makes the PUT request with the string “hassteam”
  • Caster can now add you panel to panels/video
1 Like

Hello Barry - I am not sure if I am reading your answer correctly. My question is wondering whether an Extension can be created where the config details are saved on Twitch’s back end somewhere. Your answer implies that its my EBS which would hold the Steam ID and corresponding Channel ID. Am I misunderstanding somewhere?

Yeah I misunderstood

Currently no

Yup.

There is an undocumented end point that will spit out a streams SteamID if linked to Twitch, but a lot of Streamers will not link their Steam as they don’t want their Steam public, and it’s more of a viewer feature, of the CSGO game/map fetcher, so whilst the end point exists it’s not worth playing with

Thanks for the clarification. The Steam ID was just an example - there’s actually quite a few things I would want to save in config, some of which would not be already connected to Twitch in any way.

It just seems odd to me that Twitch would build a tool so conceptually linked to the idea of it being hosted and managed via Twitch, but then expects one of the most fundamental parts of it to be hosted and managed externally. At least it looks like something that will be changing soon!

Perhaps, but you can’t do much processing or many API requests/mergin/comparing in pure client side at all, so you gotta dump off to EBS for processing.

But I can see the benefit of storing such info on Twitch itself

Extensions were designed to allow third parties to develop and run their code on Twitch. EBSs are a first step in allowing remote computation, configuration, and state management for extensions. The configuration service will be the next step forward, which will lower the barrier to entry.

1 Like

Thanks for the explanation - makes total sense from a computation point of view.

The sort of Extensions I am thinking of developing are things like latest posts on social media which, as long as the user’s posts are public, would require nothing more than passing a username parameter into a URL and grabbing a JSON feed.

Is there any sort of ballpark timing on when the configuration service would be made publicly available?

Politically correct answer: the next update to our public roadmap will be made at TwitchCon in October. Look out for more information then!

1 Like

is the info in this thread still up to date?

As of right now - yes. The config service is still not released. However, there was recently an RFC on these forums which usually means it is coming soon. My best guess would be a couple months but I guess it depends on a couple factors how long it takes.

Setting up an EBS to control everything is still possible as described above

cool. thank you for the update ! :slight_smile:

The config service is indeed coming; and soon. :wink: