# Execute Twitch.ext.configuration.onChanged in panel broadcaster with onclick button

**URL:** <https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451>\
**Category:** Extensions\
**Created:** [August 1, 2020, 3:03pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451 "2020-08-01T15:03:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![iqanansoft](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iqanansoft](https://discuss.dev.twitch.com/u/iqanansoft)\
**Post date:** [August 1, 2020, 3:03pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/1 "2020-08-01T15:03:54Z")

</div>

Hi, one question,if possible execute Twitch.ext.configuration.onChanged in configuration panel of extension of broadcaster, to change configuration manually in “input type=text” with onclick button?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 1, 2020, 3:06pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/2 "2020-08-01T15:06:41Z")

</div>

onChanged only happens _once_ per page load when it’s called.

This function loads the configuration from Twitch into window.Twitch.

You are looking at the .set function

> **[Getting OAuth Access Tokens](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/)**
>
> Getting OAuth Access Tokens

```
window.Twitch.ext.configuration.set

```

---

<div class="post-metadata">

**Author:** ![iqanansoft](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iqanansoft](https://discuss.dev.twitch.com/u/iqanansoft)\
**Post date:** [August 1, 2020, 3:11pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/3 "2020-08-01T15:11:58Z")

</div>

so… is impossible create form in this panel configuration,so that broadcaster can configure manually the extension

![Captura](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/03fe9dc4d492025036cc5587de3ed5a7c95dc6e5.jpeg)

to make this form, you have to use .set function…?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 1, 2020, 3:14pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/4 "2020-08-01T15:14:19Z")

</div>

> [@iqanansoft](#):
>
> impossible create form in this panel configuration,so that broadcaster can configure manually the extension

No it _is possible_

> [@iqanansoft](#):
>
> to make this form, you have to use .set function…?

When saving your config from the form on the config page you have indicated you call the `.set` function.

`.onChanged` loads config  
`.set` will set the config.

> **[GitHub - twitchdev/bot-commander: React based frontend only extension sample...](https://github.com/twitchdev/bot-commander)**
>
> React based frontend only extension sample that leverages Configuration Service - GitHub - twitchdev/bot-commander: React based frontend only extension sample that leverages Configuration Service

Provides an example of this

---

<div class="post-metadata">

**Author:** ![iqanansoft](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iqanansoft](https://discuss.dev.twitch.com/u/iqanansoft)\
**Post date:** [August 1, 2020, 3:17pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/5 "2020-08-01T15:17:12Z")

</div>

ok, ok I understood, I’m sad, I’ve been trying for hours, thanks

---

<div class="post-metadata">

**Author:** ![iqanansoft](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iqanansoft](https://discuss.dev.twitch.com/u/iqanansoft)\
**Post date:** [August 1, 2020, 3:23pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/6 "2020-08-01T15:23:08Z")

</div>

a solution…create this form in video\_overlay.html?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 1, 2020, 3:25pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/7 "2020-08-01T15:25:08Z")

</div>

No you create the form in the config view.

> [@iqanansoft](#):
>
> in configuration panel of extension of broadcaster, to change configuration manually in “input type=text” with onclick button?

You can do exactly what you suggest here ^^ I just had to correct you on which helper functions you needed to call. You call `.set` not `.onChanged`

> [@iqanansoft](#):
>
> create this form in video\_overlay.html?

Whilst you can put the config form in the front end it’s not advised.

---

<div class="post-metadata">

**Author:** ![iqanansoft](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iqanansoft](https://discuss.dev.twitch.com/u/iqanansoft)\
**Post date:** [August 1, 2020, 3:30pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/8 "2020-08-01T15:30:42Z")

</div>

so… .onChanged only use for refresh (notice) in panels of the viewers, and function .set for change manually data configuration

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [August 1, 2020, 3:33pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/9 "2020-08-01T15:33:47Z")

</div>

Basically yes

.onChanged loads the configuration from Twitch (but can only be called once per page load)

> [@iqanansoft](#):
>
> function .set for change manually data configuration

yes

> <https://github.com/BarryCarlyon/twitch_misc/tree/main/extensions/config_service>
>
> //github.com/BarryCarlyon/twitch\_misc/tree/main/extensions/config\_service

This is an example, of how I update config’s into “running instances” of an extension. Here I use the config set API rather than `.set` but it’s principal can be modified to use the `.send` function rather than the pubsub send API

---

<div class="post-metadata">

**Author:** ![iqanansoft](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@iqanansoft](https://discuss.dev.twitch.com/u/iqanansoft)\
**Post date:** [August 1, 2020, 3:44pm UTC](https://discuss.dev.twitch.com/t/execute-twitch-ext-configuration-onchanged-in-panel-broadcaster-with-onclick-button/27451/10 "2020-08-01T15:44:55Z")

</div>

ok , thanks
