#dev-chat
1 messages ยท Page 18 of 1
Is this correct https://api.streamelements.com/kappa/v2/tips/?
404 status code
no
@exotic vessel 

what was the old endpoint you used @eager junco
GET/POST/PUT?
now
{id} = the users id
you can get it from https://api.streamelements.com/kappa/v2/channels/me
"\"channel\" with value \"shiptoast\" fails to match the required pattern: /^[0-9a-fA-F]{24}$/"
oh
WEW
I need to sign requests now?
?
Gonna throw some docs up here in the next hour: https://dev.streamelements.com/
You have to set the Authorization header to your jwt token
we changed the signing key, you would have to get your new one
is that the Security->Personal Access Token reset or is there a different area?
"statusCode": 500,
"error": "Internal Server Error",
"message": "Darko broke it.."
}```
dammit darko

Authorization header is JWT {token} now right? not Bearer {token}?
Bearer {token}
If i do bearer token then it gives
{
"statusCode": 403,
"error": "Forbidden",
"message": "No channel found"
}
what url?
I assume I only had to change the v1 to v2, api docs don't show changes yet
and yes i grabbed my new token already
It's https://api.streamelements.com/kappa/v2/bot/commands/{id} now
%7
oh ok
gotcha
so you can't just grab the whole array of commands, you can only just grab one?
so top is invalid and not possible now? and you can only grab one command if you have the id?
I'm just trying to think, how do I know what the id is?
WIP!!!
kk
is there an API for creating contests in Streamelements? i couldn't find any documentation on it
o WIP lol sorry
There is some API to auto add commands to streamelements dashboard?
V2 docs are pinned to this channel now
gonna add a notice to the old ones
@wheat kelp The Bot didnt Track My Host To my Friend For Alert And Chat Notify
@copper skiff link dont work
@harsh willow This is an API channel for discussion related to the SE API. Please post in #helpdesk-twitch Thanks
Thought bot stuff was Api
@low sierra
since Bot isnt tracking Either my Friends Host or My Host
it's only API related if you are using the API
or Alerts not working
let's move to #helpdesk-twitch
Hi! I have an app that allow to put Tips in another system (Streamlabs) cuz in my country we have a lot of limitation to use PayPal. I was waiting for this release, but in the docs the "tips" part is in blank. It's posible to do such thing?
We will soon have many more tipping options for everyone globally so you won't need to use streamlabs for tips anymore
What country do you live in? @gilded lotus
@low sierra argentina!
You'll have other options available ๐
@finite heath wont let me use the โ โ Keys and They dont Work
https://puu.sh/y5man/2b53d3fdf5.mp4 and this
that's what #helpdesk-twitch is for @harsh willow
thought this was api stuff
your video is from the website, so not related to api ๐
could u reply in #helpdesk-twitch

Yeah I don't know anything about that, I put the
because you tried to tag thousands of people for that
@tribal moat how did u get partner?
u are a devloper?
No
so what u are?
I've been streaming for over 3 years, I put a lot of time into it, met the requirements, applied for partner, got partner
hmm
Did you mean Twitch Partner or Discord Partner?
u have thediscord partner hoodie?
Because I got my Discord Partner for being a Twitch Partner pretty much
discord partner
I have both the original and the new version of the hoodies, yes
I got the original one for being one of the first partners and I won the second one at a Discord Partners only hoodie giveaway ๐
So I wear the new one and I let my girlfriend wear the original one ๐
I have no idea, i'm not a developer
so nice
I can get discord partner
by become a devloper
and build bots etc
so
@everyone
where is the api json links?
It's not that easy (hints we are developers and don't have discord partner + it's just a hoodie!) Google Discord api
The ones for Discord you have to Google them, ours are in the channel description โฌ

Try it 
Is it no longer possible to get purchases in your store with the API?
Oh nevermind, the endpoint ignores incompleted redemptions by default
@languid trellis with the release of the v2 of the site, the previous API got depreciated. here's the docs for the v2 https://dev.streamelements.com/
Yeah I saw those, but they're far from complete by comparison
And they include some typo's
please point out the typos here @languid trellis
I'll compile a list of them first and then post them all in one go
/activities/{channel} -> Get a channel's activities.
/activities/{channel}/{activityId} -> Get a specific activity.
/activities/{channel}/{activityId}/replay -> Replay an activity.
/bot/{channel} -> Get the bot's current status.
/bot/{channel}/levels POST -> Gives the user a level.
/bot/commands/{channel} -> Retrieves all of the commands.
/bot/commands/{channel}/default -> Get all of the default commands.
/bot/commands/{channel}/{commandId} GET -> Retrieve a specific command.
/bot/commands/{channel}/{commandId} PUT -> Update an existing command.
/bot/commands/{channel}/{commandId} DELETE -> Delete an existing command.
/bot/timers/{channel} GET -> Retrieve all of the timers for an account.
/bot/timers/{channel}/{timerId} GET -> Retrieve a specific timer.
/channels/{channel} -> Get a channel's info.
/channels/{channel}/emotes -> Get a channel's emotes.
/channels/{channel}/users/{userId} -> Updates a user's accessLevel.
/channels/{channel}/access/{userId} -> Remove a user's access.
/contests/{channel} GET -> Get all contests by a user.
/contests/{channel}/{contestId}/bet GET -> Get a user's bet.
/contests/{channel}/{contestId}/refund -> Refund a contest.
/logs/{channel} -> Retrieves all logs for a given account.
/loyalty/{channel} GET -> Retrieves a channel's loyalty settings.
/loyalty/{channel} PUT -> Update a channel's loyalty settings.
/points/{channel}/reset/current -> Resets the user's current leaderboard.
/points/{channel}/reset/alltime -> Resets the user's alltime leaderboard.
/sessions/{channel} GET -> Get a user's session data.
/sessions/{channel} PUT -> Update a user's session data.
/sessions/{channel}/reset -> Reset a user's session data.
/sessions/{channel}/reload -> Manually reload a user's session data (calculate values).
/stats/{channel}/daily -> Get a channel's daily stats.
/stats/{channel}/monthly -> Get a channel's monthly stats.
/store/{channel}/items/{itemId} GET -> Get a single item.
/store/{channel}/items/{itemId} PUT -> Update an item.
/store/{channel}/items/{itemId} DELETE -> Delete an item.
/store/{channel}/redemptions THESE HAVE NO INFO
/store/{channel}/redemptions/{redemptionId} THESE HAVE NO INFO
/store/{channel}/redemptions/{itemId} THESE HAVE NO INFO
/tipping/{channel} GET -> Retrieve a specific channel's public tipping settings.
/tipping/{channel} PUT -> Update a channel's tipping settings.
/uploads/{channel} GET -> List all the assets of a user.
/uploads/{channel}/{assetId} -> Delete an asset.
@finite heath Some of /store items lacked any info so I listed that too
are you saying these have spelling mistakes ?
so you corrected them and then wrote them here?

Anyone has any idea about adding the !subage command???
@crimson sandal As far as I know the sub date is currently not accessible using Streamelements, because of limitations due to Twitch API. A Twitch forum post, that can help you create your own tracking for sub dates, can be found here: https://discuss.dev.twitch.tv/t/getting-date-someone-subscribed/2169
The api endpoint for store redemptions is currently capped at 4, but it doesn't seem clear as to how I would request the next 4 if I have more
@languid trellis with the previous version you had to use ?offset=x for the points leaderboard. maybe it's the same thing for redemptions
I have a problem: I'm very new to javascript and all that but what is wrong with: https://api.streamelements.com/kappa/v2/points/channel/username (I replaced the "username" and the "channel" and i get an error message which says that the username doesn't exsit.. :/
exist)*
@winged garden PM me your code and Iโll see if there are any errors with that
So i scrolled through this channel to see where my scripts are mistaken. i see i had to edit the v1 to v2 in the api link, and i updated the JWT token, but i'm still getting a 404 - anything else i need to edit? i have limit and offset on the links, but that shouldn't be an issue i would assume
and i'm trying to catch /tips
check the new docs linked in the topic
i already have
alright, then I wouldn't know
post the URL you're using and getting a 404
someone who knows will see it and respond
it's an AJAX get json grabbing objects from this link
https://api.streamelements.com/kappa/v2/tips?limit=100&offset=+offset
@turbid wadi any ideas?
there is no endpoint listed yet on the api doc for tips
so it's not possible to grab data from /tips?
@karmic zenith it is missing the id and set the offset to 0 if there is none
https://api.streamelements.com/kappa/v2/tips/{id}?limit=100&offset=0
the offset is set through the var "offset", and it's supposed to grab all tips, not just 1
i was able to do this before the v2 update
it's the account id, it should get as many as you specify in the limit
it does
i found the account id
let's have a look
that works - it wasnt necassary to use the acc id in v1, correct? i assume the JWT token is used as the app holder now, so i can grab the tips from anyone (if i have the acc id) now
only if that user has granted you access to do so
ofcourse - good implement tho !^^
Hello! Is there any way to get a full list of viewer points through the /points route? I've tried using /points/<account_id>/top?offset=<XXX> but it won't let me offset more than 1000. Is there another way to do this?
@vivid oak are you using the v2 of the API?
Yes
@vivid oak there you go https://api.streamelements.com/kappa/v2/points/<channelID>/top/<amount>?offset=<offset>
Interesting, the offset works past 1000 if you do /points/<channelId>/top/<amount>?=offset<offset> but not if you dont use <amount>? Side note: I might be crazy, but the amount doesn't seem to matter. I get 25 results regardless of what I put
@vivid oak just tried without the amount param, and I got 29 entries https://api.streamelements.com/kappa/v2/points/<channel>/top/?offset=0
@copper skiff I did the same and got 100. But when I specify any amount I get 25
yeah same, it might be using the default value no matter what. i'll report it
@copper skiff Thanks a ton!
Hello! I've been using v1 to get user's points on my channel, but it doesn't work anymore. I see v2 requires channel id, instead of channel name, so how can I get that? ๐
@shut raven on your dashboard in the upper right hand corner click on your name which will take you to your account info there is "account ID" i believe that's what you need
Thanks a ton @worldly mauve ! For some reason I assumed it was a Twitch thing!

Question about the v2 contests API and the UI. Can only contests created with the Streamelements.com UI be interacted with in the contests secyion of the UI or seen at https://streamelements.com/dashboard/pastcontests or are ones made programatically supposed to be viewable and interactable as well?
https://api.streamelements.com/kappa/v2/points/<CHANNEL>/top/10 everytime sends 25 users insted 10
@frigid shell Thanks for the report. The devs are now aware and will get it resolved.
oke
@frigid shell Try with limit and offset as query params. like so https://api.streamelements.com/kappa/v2/points/577c0455f9a31ea72a36b2b3/alltime?amount=1&offset=2
amount will be updated to limit tomorrow.
ok i will try
was the "type" filter removed from the /activities endpoint ?
Previously we could add type and it would appropriately change the response, this doesn't seem to be the case anymore. (ie: &type=subscriber)
its work thanks @static wigeon
@digital hemlock I'll look into it. For the time being you should be able to do.
https://api.streamelements.com/kappa/v2/activities/577c0455f9a31ea72a36b2b3?limit=300&types=redemption
Updated my little streamelements points -> csv tool to use v2 of the api, https://github.com/Slikrick/streamelements-csv, good job on making the api fairly easy to use :)
Ty daddy
I have a problem: I'm very new to javascript and all that but what is wrong with: https://api.streamelements.com/kappa/v2/points/channel/username (I replaced the "username" and the "channel" and i get an error message which says that the username doesn't exsit.. :/
exist)*
Are you using the streamelements id for the channel? that changed between v1 and v2
@winged garden
ah ty very much
np
hey so that's nothing with the api but I have a question: how can i save a js array on a server and read it again? and not temporarily :/
well the array will live for the length of the program by default, to make it consistent you need to look at a method of saving the data to disk. You can do that by just saving it as json, putting the raw data in a file, a little database, you have a few options. Google and stackoverflow are your friend :)
I usesd google like 10 hours and now we are no friends anymore ... but maybe stackoverflow? ๐
ah stackoverflow ...... same as google :/ i searched hours and hours and I don't understand anything :/
possible to restart (reset all bets) a contest via API?
restarting via website clears the pool, restarting via API does not
DELETE request to /contests/{channel}/{contestId}/stop also returns 404, all parameters are correct.
ah the docs are incorrect, the correct endpoint is /close not /stop
Thanks @broken jackal ! We will fixed asap!
Really random question - not sure if this is something I can ask in here or not.. but I noticed under modules you can have the bot post in chat based on sub durations. What is the bot reading in the API that combines different subscription types to add up the number together to the totoal # of months someone has been suscribed for?
Not sure if I understood properly, but this: https://dev.twitch.tv/docs/pubsub and
Example: Channel Subscriptions Event Message it tells you how many months someone is subbed in the event message
@haughty flume unfortunately the API doesn't have anything like that, twitch with publish the event with the correct number, but they don't give access to the number through the api
Hi! I'm a bit confused, i'm trying to figure out how to use the api, but i have not a "auth" method .. Where are an example or more info?
@gilded lotus authorization is needed for certain requests, so make sure you actually need it first. If you do, you would add the proper JWT (json webtoken) in the header you send
The examples of using it are a bit lacking with the v2 api, they had better curl examples in the old version
@tribal geyser tnx! I want to use https://dev.streamelements.com/#tips__channel___tipid__put so if I want to let other people to add tips to theirs accounts they need to give me their webtocken?
I believe so, i haven't used it personally and I have no ability to test right now @gilded lotus
I want talk private with streamelements dev pls
y








Ruined 

So much fun here, it's unbearable!! 

Recommendation: add back the curl examples to the docs, they are pretty standard for REST apis, and a runnable example to test that you're code isn't dumb is nice.
@turbid wadi
hey boys, little question about the GET/PUT api requests who are requiring the JWT check
how can we check the clients' secret? In order to send the header auth?
they have to give you their token
that is one area where oauth flow is generally nicer
yah, they would need to build an oauth and app system for that
JWT makes the application simple, but leads to situations like that :P
so actually there is no way to automatically get the token?
like in a standard oauth flow?
by instance we're trying to do a POST /contests/{channel}/{contestId}/bet on our website, but obviously we need the users' token in order to do it
and we've the users' already logged in, and we've their twitch data available too
so wondering how this stuff is handled on the streamelements site
wondering if we might use the twitch' token instead ๐ค
No, you need the SE token, so you need to prompt them and ask them for it
And is there any easy way to get it for the enduser? Aside going here https://streamelements.com/dashboard/account/information toggling and copy-pasting?
(guess not)
which means going through all the login thing via the streamelements' site
sorry for the questions but I'm a bit confused, according to what you told me there are less issues in doing a !bet command in the twitch chat than doing it via POST ๐
right now it feels really targeted towards mods for streamers who are willing to give the JWT to the app directly. OAuth flow is what allows a nicer interaction with getting the info behind the scenes ยฏ_(ใ)_/ยฏ
Any devs can feel free to correct me
Oh I see ๐ฆ
hoped to have a more streamlined way to handle it, maybe by re-using the twitch' token
https://dev.streamelements.com/ is returing 503 Service Unavailable ๐
We are aware of the issue, hopefully will be back up by sunday ๐ if you have any current questions, please ask away someone will be glad to help @queen iron
Can we have a github version of the docs so that they can still be usable in instances like this? :P
Maybe if your docs weren't down!

oh nice someone fixed it 

@wheat sphinx yw
I'm having trouble using the API switching from v1 to v2. I'm using the same Authorization: Bearer <token> in all my requests but keep getting a 403 back with the message "No channel found"
I thought it might be due to a recent username change for me but I also tried using a new twitch account to no avail
For example I'll make a request like this:
GET https://api.streamelements.com/kappa/v2/stats/[CHANNEL NAME]/daily
Host: api.streamelements.com
Content-Length: 0
Authorization: Bearer [JWT TOKEN]
Accept: application/json,text/html
which returns JSON {"statusCode":403,"error":"Forbidden","message":"No channel found"}
You can no longer use channel name, but have to use the ID

That is correct, we no longer use Channel Names. You can fin your Account ID the same place your Bearer is.
np
I've been smashing my face at my keyboard for like 30 minutes wondering what silly auth thing I missed, thanks so much
any time ๐
I don't think store redemptions are working correctly. Running https://api.streamelements.com/kappa/v2/store/${channel}/redemptions returns a 200ok but "_total": 0 and I should see 2 redemptions.
we use IDs instead of channel name now
I'm using the id. I'm able to get items but not the redemptions
cant currently test, but i think its working 

I figured out what was going on with the redemptions . I had an old test item in the store pretty sure it was pre api v2. I deleted it and created a new item and it is working now.
After doing some more testing it looks like you can only see redemption history with /store/{channel}/redemptions i have been unable to pull new redemptions
I feel stupid for asking this, but what is StreamElements authentication strategy for the API? Do we just pass along the JWT with each request? I'm not seeing anything in the docs, sorry if I missed something.
Nevermind, I'm blind and didn't see the Authorization header in the Security tab for each request in the API. โค
Hey! I am very dumb at this things... I want do insert a Joke command, that replies .. well... jokes...^^ I found https://icanhazdadjoke.com/api but i dont get it... -.-
Is this even possible?
From what i can tell, nope
no problem, it could be possible, but it needs to return plain text, i believe.
Let me try something 
Like this, just without the tags. https://08ad1pao69.execute-api.us-east-1.amazonaws.com/dev/random_joke
also, maybe someone else as a more experirence answer
@deft trail http://api.scorpstuff.com/dadjokes.php - Dad Jokes
https://api.alixe.pro/joke - Chuck Norris jokes
https://api.alixe.pro/pun - Puns
Thanks @low sierra ! ๐
Very stupid question -- does anyone have a sample of the request body that the chat bot sends when running a custom command at a REST endpoint? Surely the username of who is using the custom command is sent, but I can't find any such sample in the StreamElements documentation anywhere.
** Maybe a better way to ask the question: when writing an API for custom chat commands, how do I get the username of the person who sent the command?
I figured it out -- I needed to send the username as a route parameter in the urlfetch ๐คฆ
Does StreamElements have a similar Socket API to the StreamLabs Socket API?
I'd like to avoid polling /activities/{channel} as I don't want to run into rate limiting issues.
no, its all done through a REST api currently
Hey guys I was wondering that if i could add a local provider for tipping platform. Any ideas how i could manage it, i've got API's from streamelements as well as the provider that i'm going to integrate
What provider @deep shuttle
It's an Indian provider, called paytm mostly streamer use it in stream to receive donations. It could be a valuable addition if donation could be received through it and displayed donator's message on stream
@deep shuttle we have several payment processors on the list that we are working with to integrate. I am asking to see if that one is already there. If not, go for it. Just don't want you to do work that is already in process :)
Do you have a API for the activity feed?
@cinder lintel Sure, i'll be glad to help you guys out. If possible is there any trello board for StreamElements. Also any pointer toward such kind of payment processor with REST api integration that you would suggest will also be a great help for me ๐
I've found myself rewriting a Node REST wrapper three times now, each time for a different project, for working with the StreamElements API. There is only one other I've found on NPM and it's unmaintained and setup for v1.
So I released an unofficial, full-featured wrapper to NPM last night. https://www.npmjs.com/package/node-streamelements
@lusty meteor I'd love it if you could link to all these projects using our API
I'll see if I can share them, two of them are for streamers who requested some game integrations done. Not sure if they want their secrets revealed.
The third should be open-sourced in the next week or two -- it works with StreamElements to control events in Minecraft over RCON. The existing version of this for Minecraft was done via a game add-on and stopped at the previous Minor release and is now deprecated.
very interesting
if you make tools that can be used by more than one streamer let us know, perhaps we can find a way to help get the word out
If api bindings for languages are wanted I could make some rust ones. Doubt many people will be using them compared to node though :P
I'm currently using them in 2 projects, one already linked before and one in the works
@finite heath Absolutely! One thing I'd beg for is an Activities Socket API. Would make life a whole lot easier if we could just stream activities to an app in real-time.
sockets api, oauth flow, pretty standard nowadays tbh
@lusty meteor Really interesting! I'm going to try it out and see how it works!
What are yall doing to constantly gets subs and follows when pubsub and webhook have subscription limits. IRC and follower endpoint?
Subs get sent to us through pubsub, we just listen. Follows we have to check for every so often. non dev answer 
Oh, so yall don't have pubsub limits. Dang. I was hoping there was another way.
is there a specific format a custom api needs to be in (or, not be in) ?
plain text, i would imagine
yes, plain text
yea, i doubt its gonna expect json, html would be silly
json could make a bit of sense, as it allows you to pass more info
Heylo so i wanted to use the Omni alerts from NerdOrDie wihc currently don't support streamelemnts but i can get it setup with custom css on a local machine but i require the api key to get the info from streamelements. Is tere a possibility i could get tat so i can get it setup?
get what api key exactly... your own?
yup
JWT token for Ground Control isn't available from a delegated account - you have to go there with the actual account?
That's fair, now that I think about it.
Ground Control doesn't allow access to delegated accounts though, which confused me for a minute.
hello, someone can help me? ๐ I need information what structure must have csv file to import points from him. Now i have 2 column (username, current points) but this not work
@kierownikw#1317 use this webpage, it should work with the format you have (username, points)
that is indeed the format, you just cannot have a header on each column
anyone know why i would get { "statusCode": 404, "error": "Not Found" } when i do the /points/{channel}/{user}/{amount} api?
@low sierra omg u use my api's
i known this site but in streamelements site in import tab is "import CSV" so, please show me structure this file ๐ I can't import my file because i don't know what must be in the file
previous i can import my .csv on Ankhbot/Streamlabs import but now import is faild :/
The import CSV was based off the Revlo file that was put out months ago. I believe that one includes an AllTime column. Your best bet is to use the site: https://filter.dj/CSVtoStreamElements.html
especailly since that site uses the format yours are currently in
few hours ago i can import file where i have 2 columns (username and current points)
no I have only faild ๐ฆ
import +34k records from api it is time-consuming
username,twitch id,current,alltime is the format
Twitch ID ignored so there just needs to be something in that column
thx ๐ but this very important, every line must be enden in linux style (/n not /r/n)
@molten cipher have you tried the link we posted before? it works with your current file, no need to edit anything
I make few hours ago my own file from current list of leaderboards
two columns, username and current points
perfect, then use it there and it should work, no other way right now, and the website was made by us, it's not a third party tool https://filter.dj/CSVtoStreamElements.html
you can trust it
yep but import from api +34k records it is time-consuming ๐
The import process on streamelements site and on filter.dj are exactly the same. I was just told this from our lead developer.
you don't have to do anything, you paste your CSV in the text field, and it's imported. it takes literally seconds
Ok, thx for info ๐ but manual for the import csv will be welcome ๐
@molten cipher, larger uploads with the API have been done in less time. 34k records is not that large
I'm still seeing problems with the API and the GET redemptions running GET https://api.streamelements.com/kappa/v2/store/{token}/redemptions only returns
"_total": 0,
"docs": [],
}```
and there should be 1 redemption. If I go to the store dashboard and approve or deny the redemption it will then show the approve or denied request.
I figured it out. I was missing the Query Parameters ?limit=25&offset=0&pending=true
Not sure if this is a recent change, but if you attempt to create a store redemption while an item is on cooldown it just returns Bad Request. I don't believe this was true until recently.
If this is intended functionality, perhaps we can improve the messaging as to why it was not redeemed?
There has not been a change to the api since v2 of the site, i believe
Was the module section of the API removed when we changed to v2 btw?
@turbid wadi
@waxen jetty ups, looks like we forgot to document that
we'll add it to the docs in the next days
Ah, wonderful! Thanks for the info! โค Great job as always!
Is there a way with the Points API to add an amount of points to all chatters, like what !addpoints all {amount} does?
Setting username to "all" in /points/{channel}/{user}/{amount} doesn't seem to do the trick.
So, a friend and I am currently writing a mod for Minecraft. Currently it takes StreamLabs socket API and triggers events based on the queue. So, a new sub gets a custom chicken spawned in game with their name, that sort of thing. If it's a gifted sub, the same chicken is spawned, but the gifter's name is attriubed to a baby zombie that's riding the chicken.
We're looking in how StreamElements could also be an option.
This is somewhat important to me, because this mod will pretty much define the streaming platform I'll be using for a good while.
Having access to things like competitions and the like would be awesome, winner gets to be spawned in game for example.
And redeption could be setup and available via the store.
But it's things like .. bits dropped, how much .. did we prestige .. who resubbed and how many months .. this is vital
I'd more than welcome any discussion on the backend of StreamElements and how this could fold into the mod. I've been weaving streaming concepts into modpacks for ages, and this could take it to a whole new level.
Game Design, in Minecraft, based on chat interaction. The madness.
I will be watching this discussion with high levels of interest ๐
don't know much about programming and such, but couldnt you just fetch this information from Twitch itself? just listen to pubsub for sub messages or something?
that would work for the first part, but having access to other area's, like loyalty and the other areas could be highly useful. And if they just want to get all the info in one spot, that might be easier programatically
the potential exists for youtube, mixer, etc .. but having one core path to the streaming platform makes sense also, indeed, it could value add information
the old addage, let the streamer stream, let the streaming platform support them .. i think, fits as well
@fiery oriole You should be able to join our websocket and get all events about a channel.
We don't really have any documentation about it right now, but if you just dig around for 5 minutes in the network tab I'm sure you'll find something.
I'll be around a little later today if you have any specific questions
Hey guys, couple questions: I'm working on a custom twitch game for a streamer and I'm currently using streamelements to send whispers to people (in response to commands) through the api. What's the feeling about this? Is this something I should avoid doing? We were hoping to avoid chat spam, which is why whispers
Second question: is it possible to update a text field in an overlay through the API?
@primal spade the bot is able to send whispers in commands created in the dashboard, so whispers are fine. The second part is above my pay grade
Haha np. And thank you ๐ I didn't wanna be doing something StreamElements didn't want me doing ๐
@primal spade I think this is what you're looking for https://dev.streamelements.com/#overlays__channel___overlayid__put
Unsure though, never dealt with the overlay side of the api
I saw that, i wasn't sure what I needed to send to update a widget
they only show widgets: [] but not what the items in that array looks like lol
You could to just GET it and see how it looks on the streamer's overlay
oh yeah, duh. I'm embarassed I didn't think of that lol
That makes sense. I'll get one of the overlays that is already up and see what that looks like. Thanks ๐
I looked above for importing a csv file on the website I have 4 columns without the column names in the first row. The columns are formatted [username, twitch_id (0 defaults), current_points, alltime_points] however it keeps failing. fields are terminated by a comma, enclosed in double quotes, and each row is seperated by a '\n' character. What am I getting wrong?
How do u use this api? Do I use it with the bot?
you use it in some program, what that program is can vary.
@west knot that's not the format for the csv, the website explains what the format is
Is there an api for StreamElements statistics?
It is only for my channel. I want to work with all statistics if it is possible.
Get the stats for other users?
Yep
That's not something that is offered for privacy reasons. The stats contain tip, sub, and cheer information that shouldn't be public.
Unless the user wants to give someone else access to that information
I don't want to use private info. I wanna to process some statistics from https://stats.streamelements.com/c/{channel}. I see hidden point https://api.streamelements.com/kappa/v2/chatstats/stats/{channel} in connections, but JSON-response contains only top's.
What stats are you looking to have from other channels?
Number of messages from user on channel per day, number of emotes per day on channel. I look for it to find trends on some channels.
I'll ask the devs if that is information we are currently tracking and can add an endpoint for
number of messages from each user sent in a channel?
ex. Channel - Taus Dec 31, 2017
UserA - 20 messages
UserB - 38 messages
etc.
and total number of emotes used in a channel for each day?
Yeah, something like that. For emotes likewise.
Channel - Taus Dec 31, 2017
EmoteA - 20 messages
EmoteB - 30 messages.
Thank you for the answer.
Am I missing the auth button or is there not one yet?
Wondering if I have to send users to your site to manually grab the jwt
oi
anybody here ๐ค
Is it only possible with the api to have events, when for example a tip happends, or is it just possible to make a request to get the info
@soft idol There'll be an update for the stats endpoint within the next week or so ๐
Which should provide a much more flexible API.
Yeeeesss! i really wanted this.
Now i can have an alert in my discord text channel whenever a sub or tip happens.
Hey had a few questions about the API for anyone that might know. I want to use the Tips endpoint to get all tips that have happened after a specific time. Secondly I am not sure how to get an authorization token for the required header
@main remnant https://dev.streamelements.com/#tips__channel__get should give you as much info as you need
there is a "createdAt" property, if that's what you meant.
and all the authentication you'll need will be at https://streamelements.com/dashboard/account/information
there is a createdAt property in the data that the end point returns. But what i mean is the ability to put a parameter in the url and only get tips that happen after that created at time so I only see new tips
as for authentication do you mean geanerate a invite link and use the code in the invite link is my authorization header parameter?
auth is the JWT on that page
^
and all the info you'll need is at https://dev.streamelements.com/#tips__channel__get
There are no parameters for date,
As said, only parameters are the channel
You could do it manually with your own lines of code, but there are no parameters from our side.
ahhh its a bandwidth thing tho on my end. I take a look tho thanks for clearing things up for me!
with the auth token what is the param name for it ? it is the jwt or something different to be able to add it into the header ?
It's the jwt @shrewd trail
so since it is a get request shouldnt you be able to do ?jwt=tokenhere and that should also work too or not ?
All you need to know about jwt is at https://jwt.io/introduction/ including how to use it.
hey guys, quick question regarding the /channels/{channel} endpoint... does that just return 200 if that particular channel uses Stream Elements CURRENTLY (which is what I'm looking for) or does it provide return data for any user that may have logged in/connected their twitch to check out the bot/package even once?
trying to work in an integration into my bot that will add a SE badge/blurb/icon (something that identifies them as a current user of SE)
@static wigeon @wheat sphinx
it returns a 200 when that user connected their twitch account once
dang
any possibility of something like what I'm looking for being added to the api at some point? over 2 million ppl across discord see the output of now live daily and aside from being a nice bit of flair on the announcements it would be really great promotion for SE in general
@low sierra 


I'll take that as a no...
So you are looking for an indication of them being live with se?
Or simply the fact that they are an active user
basically that they are an active user of SE
I'll try to bring it up, but for the time being /channels/{channel} is the closest thing to what you are looking for.
ok, thanks for the response... figured it was at least worth asking about
Yeah for sure no worries ๐
I am having an issue with pulling my channel stats though the API it is returning with all 0 when I know there should be values there
also tied using monthly and it returned nothing as well
hello guys
i'm at the very beginning, i'm wondering how can i call your APIs.. i'm interested in the autentification process
is there any javascript boilerplate?
The authentication is simple using JWT for any endpoints that need it.
yea i'm not really familiar with that..
is there any example I can use? of a request? in php or javascript
JWT authentication is literally the same everywhere. You log in and get a token that you use in header for each request from then on
there is nothing special about stream elements here. Just google API JWT authentication and you'll find plenty
hum, the token isn't given to me by stream elements?
it is given to you by stream elements in exactly the same way like any other API in the world pretty much ๐
@merry plume you can find it by clicking on your name in the top right of the dashboard to enter account settings
url: "https://api.streamelements.com/kappa/v2/CALL_HERE",
type: "GET",
beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization','Bearer TOKEN HERE'); },
success: function(response){
},
error: function(response){},
});```
assuming that is what you are asking for
wonderful. thank you.
one last thing, that i should be okay. the channel id requirestd, is actually the account ID?
it's the only id i can find in there
or is the twitch token maybe?
yo guys, it's me again
i'm having some troubles in working with the apis, specifically the contest api.
I managed to create a contest and to open it by adopting the apis, however, i cannot seem to be able to choose a winner.
hum, i was wondering if i had to close them before
Close than pick winner
wonderfull! i'm working on that.
but i only see the "stop" api
not the close api. is that the same?
It is
I'm actually really curious how you managed to do this after you're done and it's working well for you
with the connection LoL
oh.. i would be more than happy to tell you
i was afraid you were thinking of me as an idiot because of my questions ๐
No no not at all
I wish more games had an API like this so that we could integrate with more games
as soon as i'm able to close the contest via api, it's finished. and it seem to work pretty well tbh
@merry plume What language are you writing it in, and is it open source ๐ ?
i'm using javascript and php
it's.. broken source lol
i'm working on this since a couple days, as a proof of concept
but it turned to be quite complex
lmk if you want contributions, because i really like the idea.
indeed it does
do you think it could be, someday, implemented into the system itself?
throw it on github ๐
Hopefully one day
But i do have a ton of other things that needs to be fixed up first ๐
๐
i will make the code public once its a bit polished and secured. right now i'm making it for a particular streamer.. so a lot of it is hardcoded in there
That's alright, lmk.
i'm just wondering about the closing thing.. isn't the contest automatically closed once the time runs out?
it seems like that from the interface
Yeah currently voting stops after the time you specified.
But i might look into creating an option without the timer and letting the user close it.
but i tried to use the /winner api after the timer runs out
and it still doesn't work
so, from APis, you have to close it "manually" even tho it's closed by default?
You would have to close it first and then select the winner.
ok, i'll update you soon ๐ thanks for the support. I really appreciate all your work.
oh, btw, i know that you don't have access to Riot apis because they denied the key or something?
in order to access that information i adopt a 3rd party API
i think it would be precious for you too.
i'm using it in order to abandon nightbot and use only stream elements.
nope, it's not working... it doesn't even provide me with an error
the answer from the API is "null".
it's weird.
and curl_errno is not triggered...
okay, i've managed to read the answer from the curl. it's
<pre>Cannot DELETE /kappa/v2/contests/TWITCH_ID/5a5e8222ac5a8600016bb38f/stop</pre>
where both my twitch id and 5a5e8222ac5a8600016bb38f (contest id) are right.
so i don't really know what i'm doing wrong at this point.
@static wigeon sorry to bother you
this is the request that i'm doing. nothing else.
i've tried to tweak with the content type a lot, by removing it or putting application/json. doesn't change.
so i don't really know what else to change.
i've tried to close also a contest that is still running, doesn't work.
maybe it has to do with the fact that the response expected is 201 and not 200 like in the other calls i make
there it is: it's a 404.
the resource isn't found.
well.. that's it. I can't figure this out.
hopefully you will be able to give me some insight ๐
i'm 90% sure that it's something on your side. i've tried to use an external software to perform the requests
and i still get 404
if anybody wants to investigate, i'll be here for a couple hours
The devs are in Europe so they're likely all asleep but I bet you'll get some replies here tomorrow
oh, like i am.. so i'm supposed to be asleep.
๐
it's one of two cases: either i'm so noob i'm missing something very stupid, or it's something on the server side

more like 29. lol
Further information:
- i've tried to use other apis with the DELETE, and they work.
- i've tried to refund a contest, and i get the 201 status. however, from the interface, the contest keeps running.
- i've tried to DELETE (without the stop) a contest, and it works.
I figured it out.

I still think that the close api is broken, but i managed to pick a winner without closing the contest.
@static wigeon yo
Hey, i cant import my deepbot points.. i put the API in the Box , press Update and nothing happend
ยฏ_(ใ)_/ยฏ
Hello. I've found a bug on your APIs.
The refund API doesn't work properly. It gives to me status 201 but the contest is not actually refunded.
proof
as you can see from id in the URL and in the api request, the contest is the same. I've called the refund, but the "refund" button is still active on the dashboard (i.e., it's not refund)
I've ofcourse tried to refresh the page, doesn't change.
I've tried with multiple contests just to be sure.
I think that's a bug across the system
@merry plume its a bug we're aware of, you can upvote it here https://streamelements.helprace.com/i641-refunding-a-contest-doesn-t-actually-refund-it and you will be notified via email when theres a fix in the works
Oh, okay! thank you
@finite heath would it be helpful if I added the screenshot in there?
specifying is only an API problem?
sure
yo, the twitch token can be used to perform requests on twitchs apis?
Hey, anybody here who can send me the link to the streamelements api documentation?
Thanks. Am I correct that i get all the credentials and everything as soon as i register?
yep, should be visible under your account settings
Thanks alot.
Still having issues getting the monthly stats via the API, daily seems to be working but monthly stats return 0 values.
@chilly yoke what is the exact URL you're hitting? there needs to be a ?from=<date> and ?to query param with dates iirc
@wheat sphinx I tried both https://api.streamelements.com/kappa/v2/stats/5928cda4ef496b46630c8ab9/daily and https://api.streamelements.com/kappa/v2/stats/5928cda4ef496b46630c8ab9/monthly
Neither say they take date paramaters https://dev.streamelements.com/#stats__channel__daily_get
Hey what's going on?
@chilly yoke the docs are wrong then, you need a ?from=<ISO date> and ?to=<ISO date> query param for it to work. You can see it if you load the dashboard with the network tab open
https://api.streamelements.com/kappa/v2/stats/57b88bc0a302c08f2ea15ef3/monthly?from=2017-12-27T15:00:16.841Z&to=2018-01-26T15:00:16.841Z for example
I am curious how you guys count emotes on your stat website
Thanks @wheat sphinx that fixed the issue!
hem, am I the onlyone that cannot reach the api page anymore?
the dev brings me here
@merry plume fixed, thanks for reporting
that was fast ๐
tell him to fix the refunds then ๐
o?
refunds are not working
refunds of what?
of contests
oh
^^
I cannot find any documentation about how to pass the jwt_token. Any idea where to find it? ๐
yeah it is
ok ty
@thin mason you need to pass it via a header
Authorization: Bearer <your jwt>
function callSE_POST_API($url, $data)
{
$curl = curl_init($url);
//build json from data
$data = json_encode($data);
//pack header
$header = array(
'Content-Type: application/json',
'Authorization: Bearer ' . SE_JWT_TOKEN
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($curl);
curl_close($curl);
return $result;
}
@thin mason an example for you
in php for a post call
remember to decode the json response (json_decode)
THanks the information that it is a Bearer token was enough! ๐ Was just wondering, why it's not written anywere there... ๐ Or in the api documentation. Maybe I just was not able to find it! ๐
@thin mason it is listed in the "security" tab, but i think they assume people messing with those things to know the general JWT flow
Anyone have a suggestion I wanna make a twitch bot with java I'm new to twitch and decent at java is there any premade bots I could base mine off ?
Hey, all! I was looking to add StreamElements as an OAuth integration, but I can't find any documentation on the matter. Is this functionality available/planned?
@warped lichen Not available right now but it's a future possibility
Quick and curious question, what is the status or ETA of OAuth API?
It's not currently planned
@low sierra That sure sounds strange, because that is not what I was told when I asked about API access last
^ I do not remember whom I was in contact with then, but priorities change, sure ๐
You chatted with our lead developer who told me earlier today that it's a future possibility but not in the current plans. You're absolutely right about priorities being fluid.
That was back in October
Thout sound about right, I think, I'm just not a fan of making a text-box for people to post the JWT token without any authorisation they are whom they provide to be. Anyhow, thank you for the headsup ๐
No problem. I hope it's something we can add in the future ๐
Me too, I'll just make a public encryption between the user and my servers to be sure.
question. Is there a way to pull their twitch name? Because you could oauth with twitch, and ask for the JWT, and if they don't match....
idk, I ahven't played with the API yet, so maybe it isn't something possible
@willow plank
Hello ! I have a small question ... Can I talk to someone in order to solve my issue?
@scenic palm Ask what you need help with
Question, is the user defined "name" of the points visible on the API? I'm writing a discord bot to check them and I don't see that anywhere
Hi guys, i would like to talk with some dev about adding new feature to "Current song" addon.
P.S. I have sample code, and proof of concept ๐
i would like to add support for last.fm to current soung widget.
This is what i concider a proof of concept.
https://www.w3schools.com/code/tryit.asp?filename=FOBNXC5H3N9T
User will have to create own dev account on last fm, to get hes api_key.
just needing some help. I had Streamlabs Chatbot before SE, and i had a command that read an API.... $readapi(http://api.scorpstuff.com/dadjokes.php)
is there a way that i can use this in SE?
Hello @ocean barn, you can use ${customapi.http://api.scorpstuff.com/dadjokes.php}
That should make the bot respond with the random joke from the dadjokes page.
wow, thank you, that worked a treat
Splendid! ๐
Hello guys: is anyone aware of a bug in the delete contest api?
are you closing it first?
let me double check
so, this is what i see from the dashboard:
they are all closed, right?
so now, if i call the contests api in get, i see there is no active contests
i then try to delete the first of the "contests" list, let's say, 5a82360dee99e2000179b4d4
it gets me a 204 as answer. everything seems okay.
but if i call again the contests, i get now an active contest (ANOTHER)
5a8167c8d1ea6000012e9b30
and the one i've deleted seems to be gone.
so it seems to work, but it's also weird.
ill let one of the devs know ๐
I can provide more details if you need me to
Asking one more time before I just assume no and make it a variable in my programs config file. Is the user defined โnameโ of the points available through the API?
@jaunty lintel https://dev.streamelements.com/#loyalty There is a get endpoint for retrieving a channel's loyalty settings and a put endpoint for updating the loyalty settings
Aha. Under loyalty. Not points. Got it
@honest bone yo, any news on the contests thing?
I havent had time to speak with anyone. maybe @wheat sphinx could have a look
i'm doing some testing right now
i can speak with @wheat sphinx if he needs any data about the problem
okay, i've got some new information: the whole thing seems to work. the behaviour seemed weird because I had SO many contests that the new ones that were popping up were old ones (yet, still to have a selected winner) and so the interface were giving those to me
i've just discovered that the "contests" provided are 25 max.
and the last of those can be "active"
however, if i may suggest, the active response is not consistent with the interface
one can have N active contests, one on top of the other, and not just one as the API tells
i do recognize that from the interface you cannot open a contest until you close/refund/select winner on the active one
but from the api there is no such limitation, one can open 100 contests, and all of them are active.
the whole active thing just works in a way I can't predict... I've deleted 25 contests, and no contest popped up as active (from interface). Then i deleted another 25, and one was active (again from interface).
So, I've relayed your message, and i was told we are aware of the issue. So thank you for the information, I don't have an ETA on the fix, but it's on the list. ๐
He will send a messenger pigeon your way
be prepared with crackers, cause those things can be painful if you don't feed them
still waiting for that messenger pigeon 
Is there a oauth flow or do I need to have the users copy the JWT manually?
manual JWT right now
not sure if this is the place to go but....
i'm want to make my own API lookup database. I want to have someone in chat enter a cmd (eg. !funfact) and it will return a random pre-entered fun fact.
any ideas?
@ocean barn You can use the built in command variable to call your api. ${customapi.link-to-api.com} Outputs the Body in plain text ${customapi.api.rtainc.co/twitch/8ball} Outlook good.
morning/afternoon beautiful people of SE
while browsing the control panel i have noticed few changes in the menu . Looking good as always ๐ just quick question what happen to the youtube / mixer integration ? it used to appear as [coming soon] feature . Now i couldn't see it anywhere 
We just removed the design, does it matter? 
We still have plans to support Mixer in the future if that's what you're worries about, youtube is coming shortly
No I am not worrying about it bud , that question was mainly out of curiosity 
I am confident that our awesome SE team is working on it ๐
Hi @stone belfry i'm a little confused with your response, are you saying that SE has it's own API that i can edit for my own cmd on stream?
@ocean barn If you have a custom api hosted on your own server you can use the supplied command variable to call that api. So if you have a random response system that you created you will use the variable SE supplies in the commands window to call that when the command is typed.
!command
the bot contacts the api, gets a response and replies in the twitch chat.
I'm not sure on the specifics of how the backend needs to be for the bot to grab a response though.
But I assume a db would make the job harder than it needs to be.
Ok, that sounds more complicated than i first thought.
Is there anything, other than !quote in SE that I could utilize?
You could use ${random.pick}
So !funfact as the command and then the response would be ${random.pick 'fact 1' 'fact 2' 'fact3' 'etc'}
im not sure what /points is meant to represent
@wise idol Try #helpdesk-twitch for your question ๐
@wise idol you posted in the correct place. Are you looking at the documentation?
yep. it isnt super helpful though
when it says 'top x' users i dont understand what they're the top users of
most messages?
/top is the "Current" points leaderboard
Sorry @wise idol I failed you ๐ฆ
a channel's loyalty currency
From the site's dashboard check out the loyalty section in the left panel
alright, that answers it. thanks
viewers earn currency by watching the stream and following, subscribing, tipping, etc. and can use those points in chat modules/games, contests, giveaways, stream store

current or top is the live view of the points leaderboard and goes up and down where as all-time is more of a guage of loyalty because it only increases by watching and following, subbing, tipping etc.
@low sierra Do you know of any api's that can be used with the command variable? Random jokes or anything?
Anything really, even examples I can look through would work.
Hmm, I have one that gives some puns, though it only gives like 10 or so. I just googled "API _________" and tried them until I found something
hey you smart people :)anyone know if hours can be pulled from the api
@static wigeon ?
?
Nope 
Ah 
Write it down somewhere 
ya that would be aweosme
also could the same endpoint have the total number of users for that channel?
or is that one for that
nvm thats not needed as i can use providerId from the channel get to see if there a valid user of SE
@pale nacelle You can use the chatstats API.
https://api.streamelements.com/kappa/v2/chatstats/global/stats?limit=100
Where can I find the documentation that gives an overview of bot integration?
I want to make a bot, but I'm unsure how a streamer would integrate it into their stream
And if there's a general outline for any restrictions a bot may have.
For instance, I have a main webapp that will POST to my bot upon certain events (or my bot will poll, whatever works). When a request is received, will my bot be able to POST tips, points, etc to the streamers account (and trigger any animation, etc)?
@warped lichen for the last part, I highly recommend checking out twitch's dev TOS
there are a lot of restrictions for bots, but that is the best place to know
@cinder lintel good to know! I'll check it out. So does that mean I'm really writing a Twitch bot that just happens to interface with StreamElements? API aside, this bot doesn't actually reside within SE somewhere?
What are you writing the bot for? we have a chat bot for twitch already, I can refer you to more information
Without going into too much detail, I need to be able to POST tips to a channel based on events from our platform
Streamlabs and Streamtip have this functionality behind a conventional API (authed by OAuth2) and we want to also bring StreamElements onto our platform. It was my understanding that to post tips, etc on SE you had to create a bot of some kind
by channel, do you mean discord
I mean post tips to a Twitch streamer's SE account
Sorry, that was worded awkwardly
ahhhh, now I get it, lol
anything will work, even a simple form on a website
the auth is a bit different here, you have to use the JWT token, but it still works
Are there docs for the basic flow of getting this JWT and performing basic operations?
And generally how our platform + SE + Twitch interact?
That gets me the endpoints, but I'm looking for details about getting and passing JWT tokens, etc
Basic auth stuff so that I can use the endpoints
@warped lichen you will have to have people supply the JWT, there is no way to do it automatically
@pulsar willow you should be able to use the https://dev.streamelements.com/#bot_commands
since !roulette is a command
@pulsar willow I'd say no, not quite sure how that'd work 
Anyway, one more thing as a sanity check. If I post a tip using the API, will that trigger and overlay effects that a "normal" tip would (notification, message, etc)?
@warped lichen New docs are incoming (@low sierra ๐ก)
Also if you wanna trigger an alert either create an activity or send it directly to the websocket.

https://streamelements.com/terrabuck/tip @static wigeon
eth address pls.
@static wigeon so posting a tip won't automatically trigger an alert? I have to post the tip and use an activity or send to a socket?
@warped lichen Could you explain me your use-case ?
I want to post a tip using the API, but still have an alert appear on-stream for that sweet recognition
I'm wondering if that alert will appear automatically when I POST a tip, or if I have to trigger it separately
Then i'd just create an activity for sure.
you can also emit an event called event:test
With this payload
event: {type: "subscriber", name: "FeelsGoodMan", amount: 44 }
listener: "subscriber-latest"
anyhow, we'll try and push out the docs asap.
@eager vale You can find your JWT token on your account information page (Click on your name next to the Sign Out button) https://streamelements.com/dashboard/account/information
Maybe I'm not understanding how JWT works then
the token is needed for authentication when using certain parts of the api
In the docs it lists which endpoints require authentication
That's it?
yep
Seems too good to be true
Alrighty, be back with more questions... I'm sure ๐
Thanks! ๐
Wow, that's magical
Is there a way to add points to all users through the API? I'd essentially like to do the equivalent of !addpoints all {number}
Passing all as a username to PUT /points/{channel}/{user}/{amount} doesn't work and the bulk update PUT /points/{channel} requires a full payload of current and alltime points it seems.
Hey there, with the loyalty points API, is there a way to get the total number of people with points, for the rank? I know how to get the user's rank, but not like this (rank 45/234)
Did something change with /Stats? I am getting a 404 error when calling daily and monthly
Is there a web socket (webhooks, pub/sub, etc.) endpoint? I don't see one in the documentation, but I figure it doesn't hurt to ask.
There is, but no real documentation for it yet.
@eager vale let me know what your use case is, and i'll try and guide you in the right direction ๐
I'm working on a simple Electron app that lets users update text and image fields (essentially an expansion of the Ground Control app).
We're looking at moving from my custom browser source to SE for an online tournament production.
So, I'm trying to make the process as convenient and efficient for the broadcaster as I can.
@eager vale are you just informing us or do you need any help? Seems like an amazing idea, really cool
Oh, Styler was asking for information on my use case for web sockets.
haha

What does your current browser source exactly do?
Because our websocket is mainly one way.
Changes scores, team names, etc. realtime.
I just need to know when one of the layers for the overlay changes
"widgets" in the overlay object
There is an event called overlay:update which is essentially when an overlay is saved.
ooooo
That event relays the entire overlay object
Yasss
Which you could do a diff on to see what changed
Is the wss endpoint wss://api.streamelements.com/kappa/v2?
Here's a small snippet i saved from some time ago.
const accessToken = '';
const socket = io('https://realtime.streamelements.com', {
transports: ['websocket']
});
// Socket connected
socket.on('connect', onConnect);
// Socket got disconnected
socket.on('disconnect', onDisconnect);
// Socket is authenticated
socket.on('authenticated', onAuthenticated);
// New event received
socket.on('event', onEvent);
function onConnect() {
console.log('Successfully connected to the websocket'):
socket.emit('authenticate', { method: 'jwt', token: accessToken }));
}
function onDisconnect() {
console.log('Disconnected from websocket')
// Reconnect
}
function onAuthenticated(data) {
const { channelId } = data;
console.log(`Successfully connected to channel ${channelId}`);
}
function onEvent(event) {
// Deal with events
}
Oh, sweet
So in this case listen to overlay:update rather than event
Let me know if that helps a bit.
Will do! Thanks!
hey dudes

Hi! I practically know nothing about coding but looking for codes or coders that can help with making a chat box overlay more unique?
@winged lantern Are you looking to improve the chat widget itself or the overlay as a whole? What does your current scene look like?
๐ค
Hey, anyone from SE
Maybe it have some ways to connect SE points , that using in roulette with any bots in discord channel?
@high swallow
I want to use one points wallet for discord and twitch channel in same time
A discord bot is planned
yo, i would like to catch a string that has spaces as command parameter value
any way to do so? (right now each substring of the value is given as a different parameter ${1}, ${2} etc)
okay, apparently that's not true. ${1:} contains the full string, even with spaces. So next question is: is there any string replace function that i can use?
${queryescape} does the work. thank you.
@merry plume glad we could help 
Hahaha. I JUST woke up. My favorite support questions are the ones you asnwer yourself 30seconds later, lmao
Okay, i've got a good one: is there any api call that allows to make the bot say something?
i know that i can generate a mpeg file, but how about making it talk?
There is a TTS endpoint yes
just a sec
sure
yep, that returns a mpeg file
what i'm searching for is something exactly like /say, but with speech. so on a specific channel.
well it has to output somewhere so there would need to be an application that plays the mpeg on the streaming machine
certainly more complicated than making the bot post something in chat
yeah, but as the bot is able to reproduce something like tips/follows/etc messages
but anyway, i get the point that is substantially different.
sounds like something our devs would need to build into the overlay editor so that the sound plays through the browser source
yeh
It's been suggested on the ideas board
i'll up that there then, thanks terra.
Since you are here, can i bother you for another issue i'm having?
I'll give it a shot
thx. I'm trying to use the /say functionality to launch a commercial on a channel.
StreamElements is added as editor for the twitch channel, and i'm passing as message to the /say api '/commercial 120'
this is the result i'm getting.
seems like it's not parsed.. or something.
We would need to request the permission through the twitch connection
Something that I believe we'll be doing
Other bots request that permission
Well, that is for offering your api that does the commercial launch
like a button in the panel that launches a commercial. in that case you act via twitch apis and you launch a commercial, that's okay and you need a particular launch_commercial scope
in this case tho, shouldn't the streamelement message be read just like any other message?
given the SE it's an editor.
I'll check with the bot dev on it
i'm afraid that this is more something on the twitch side that on yours..
It might be because the SE account is a verified bot account
so it needs to have the scope first
whereas a regular user can just type /commercial
I've spoke to the twitch guys, it seems like probably SE has some commands whitelisted and /commercial is not among them.
Do you know anything about it?
Could be. Some commands such as /w are disabled
Okay, i'll wait for some confirmation on that if possibile. In the meanwhile i'll try to work around it by using the bot renaming function
Hello! Are there any other "hidden commands" such as - ${random.chatter}, that would be possible to vary the bot interactivity with the chat?
For example, a person writes "!Slap" and selects a random person from the list of viewers. And the bot responds to the chat "Waylands is slap random.chatter"
Is there something similar?
(this is Google.translate, sorry)
The $(random.chatter) is a variable you can use to do what you want. Other than that, you can check out the variable list in the chat commands part of your dashboard to see what is available
@merry plume I've been told that /commercial will be whitelisted beginning tomorrow
Morning all, I was really curious, is there a way via the API to pull a list of all users that currently has points for a specified channel?
With a bit of work you can use this one.
Multiple calls using the offset will bring you the whole list.
My concern was the quantity of calls and rate limiting
"quality"..?
doesn't matter, realised I was mis-reading the doc!
I assume there is no update on any form of OAuth flow for the JWT yet?
@low sierra im looking to pretty much have my own chat overlay created. A custom one that's not currently an option but one made specifically for me.
@merry plume /commercial is out now.
Thank you very much guys.
Is there a way to redirect as whisper the default commands? For instance, !followage?
There is no way to set it for default commands, but I have an api you can use for followage, so you can do a custom command @merry plume
Any chance there is a variable I can use? I've made a !points command in that way
like {user.followage}
you want a command that shows for how long a viewer is following you?
Well that is an example, I'm trying to clean up a bit the chat and having some of the bots answers as whispers seems a good way to do it.
points response can't be edited
The feedback from the bet, for instance, would be nice to be in whisper.
if i'm not mistaken
Yeah, that was my perception, I just wanted to make sure ๐
you can however change the command from points to something else you want
or disable points command and make a custom with the changes needed
I'm sure then you can enter that one u mentioned above
@merry plume use this in a custom command response ${user} Has Been Following ${channel} On Twitch Since ${customapi http://api.newtimenow.com/follow-length/?channel=${channel}&user=${touser}}
I use this one $(user) followed the channel on ${customapi.https://decapi.me/twitch/followed?channel=rippz0r&user=$(user))
ofc change from rippz0r ๐
pretty much the same as mine, lol. I just have variables to make it easier to share ๐
yeah should be similar
hey so i was talkin to @undone dove on facebook earlier about stream deck functionality. if i'm lookin at this right the api only supports bot functionality. what about other functionality like loading media or other functions like skipping,pause, mute, unmute notifications. or init a game that can be seen on the screen in stream w/o the use of chat commands?!
There are hotkeys with the Ground Control application you can use
???
taking a look
4 keybinds. and an event manager... naw i'm talkin MORE functionality
like i upload a sound and i want it to play when i press a button boom it plays
or another being another sound.
maybe an animation on command
@sonic sedge StreamElements integration with StreamDeck would be done on there end. We tweeted at elgato a bunch and try to get them to notice us but alas
or a rollete wheel appearing on the stream screen and spinning away to show the winner
yeah but what i'm seeing here in your api theres 99% bot commands and pull features and 1 % music control
yeah, we would need assistance from elgato for a lot of that. Right now, the only way would be through the bot commands
If it calls using the !redeem <item> command, you got your sound effects
so there is not command that can be sent to the account via private key to make those happen?
I am saying there is
i understand theres those 4 functions i see in ground control. imo no offence thats not really all that much.
the theme gallery is awesome the bot chat fun is great
I know that, GC is going to get some upgrade in the future, it isn't anywhere near done yet
but i'm talkin things that will really interact witht he stream head on








