All Config¶
GET /config¶
All Config
Authorization¶
Send Authorization: <Twitch Extension Client ID> <Muxy JWT>. The JWT role must satisfy the endpoint requirements shown in the examples.
Responses¶
200 Response¶
200
Content type: application/json
Schema¶
{
"type": "object",
"properties": {
"channel": {
"type": "object",
"properties": {}
},
"extension": {
"type": "object",
"properties": {}
}
}
}
Example¶
{
"channel": {},
"extension": {}
}
400 Error¶
400
Content type: application/json
Schema¶
{
"type": "object",
"properties": {
"reason": {
"type": "string"
}
}
}
Example¶
{
"reason": "400"
}
Examples¶
Curl¶
curl --request GET \
--url https://api.muxy.io/v1/e/config \
--header 'authorization: <Client ID> <any JWT>' \
--header 'content-type: application/json'
Javascript¶
const medkit = new Muxy.SDK();
await medkit.loaded();
const config = medkit.getConfig();
Node¶
type ExtensionConfig = {
enablePurchases?: Boolean;
};
type ChannelConfig = {
itemAmount?: Number;
};
type Config = {
channel: ChannelConfig;
extension: ExtensionConfig;
};
const medkit = new Muxy.SDK();
await medkit.loaded();
const config = medkit.getConfig<Config>();
console.log(config.channel.itemAmount || 100);
Generated API reference
This endpoint is generated from rest-v1.yaml.