#dev-chat
1 messages · Page 19 of 1
I am not a decent programmer, so I don't know the magic to make everything work, but I can tell you this. Everything with SE is run through the API. The wedsite, the bot, etc. If it can be done through the API, then other things can link into it. IE: If you want to trigger a sound effect through the API command, I am sure there is a way to get that to trigger from an streamdeck with the API. It just takes someone much more knowledgable than me
true the SD has that but say theres an element to be shown on the stream or triggered to appear and animate With the interaction of the bot not just test in chat.
i’ve been good! @sonic sedge hbu i apologize for my lack of api knowledge still learning 😄
Are the realtime events you can listen to documented anywhere? I'm Particularly interested in getting the tips in realtime.
Connected to the websocket, authenticated, but I'm not getting anything while listening on 'event' atm when manually generating "emulated events" such as tips. Is this intended?
What do I need to listen for to get the incoming new tips? Thanks. 😃
i cant answer the more techy part
but maybe if the emulator isnt sending events, try manually adding a tip on the tip list and marking it as an 'imported tip'
those events count as real events.
@magic zenith emulated event will be register as a "event:test" event in the websocket
@finite heath @true ridge thanks!
Does the /tips/{channel}/top endpoint only return a max of 10 entries?
Is there a way to query how much a specific user has donated?
check the code on the top tippers page
I can't find any query for the total based on a user's name or id, I only see the total coming in part of enumerating top tippers.
Is the API down right now? My responses are returning 500
What request are you making?
POST /tips/{channel}
Can you show the payload?
response = HTTParty.post(tip_url,
headers: auth_headers,
body: {
currency: 'USD',
payFees: false,
amount: amount_in_cents / 100.0,
message: message,
imported: true,
user: {
email: user.email,
username: nickname.presence || 'Anonymous',
}
}
)
And you have proper content-type headers?
And this is the response: {"statusCode"=>500, "error"=>"Internal Server Error", "message"=>"An internal server error occurred"}
I will check!
Still no good. Here are the headers:
def auth_headers
{
'Authorization' => "Bearer #{token}",
'Content-Type' => 'application/json'
}
end
@static wigeon got it. For some reason, passing the hash by itself wasn't working, so I serialized the hash first now everything works
am i going crazy or did this chat name just change names Kappa
i could of sworen it was #api Kappa

ok im not going crazy
It used to be called this a long time ago, consider it a throwback 
you passed the test @pulsar willow 
😃
I legit just thought the same thing...
What is the right way to contact the SE devs about business inquiries? Is sending a direct message on twitter / fb fine?
Developing an Extension that uses the SE API
Basically I just wanted to ask if it is OK to develop an extension that integrates with SE and if I may call it "[My Extension name] for StreamElements"
@gusty turret maybe a question for you? 🤔
I think its gonna be fine. Need to know more about what you want to build
Can dm the info
sure
i was looking through the API and i seen you are able to monitor when someone gets a tip n i was wondering if u was able to monitor when the person got bits ? As i have a plan to make a plugin for a streamer i watch where it will incorpate using the API to monitor when they get a tip n bits and have it spawn an item within minecraft at there feet
ya, bits are part of the alerts
nonamenamer was just discussing connecting to the websocket and listening to events the other day
Hey. Is there any link with api for another bots? like $readapi(link). I would like to make a command that will show the place of the person in the top of the channel's chatters. But since I'm using the bot not on my channel, I can not use your bot 
@acoustic mesa Do you mean the user you want to get the info from doesn't use SE?
Hello bois. I've noticed that when I open a contest via API, the bot doesn't provide the confirmation in chat anymore. Is that something that can be customised via API?
I'm referring to the confirmation after a bet.
It's now possible to disable the responses but the default is to have bot responses to bets
Added within the last few days
Ah, that is what changed it.
The default on apis is to not have the confirmation tho.
I guess this is an unwanted behaviour?
Maybe a new parameter has been added but it's not yet documented on dev.streamelements?
Ok, it's been patched and will be in the next deployment. In the meantime specifying the property should work 
Oh, perfect. Aaand the property is...? 😛
I cannot find it here.
(btw, i'm sorry guys, i'm always here requesting and reporting stuff. if you ever come to italy you have a guaranteed pizza on me!)
I imagine it would be the same as in the giveaway system which has had the option for some time
okay, i'll test it right away!
works like a charm!
Btw, I was wondering, what's a SE champion?
They're basically dedicated SE helpers
Oh cool. Is there a way to apply for it? I would like to give back.
If you're active in #helpdesk-twitch and #helpdesk-youtube the higher-ups will see
I am not sure if we are full up on beta testers or not, but I might be able to get you into that
Anything that you find appropriate. I'm quite skilled with SE in general, and in particular with the APIs (as the good guys that answered tons of my questions know :P)
Yeah just be active, we will definitely take notice!
Will do 😃
Hi all, I was referred here. I was wondering if anyone was familiar enough with deepbot and the streamelements API to run a custom cappagen command
I'm hoping to run a cappagen command from deepbot without bringing another bot into my channel
is the channel ID the same as the overlay ID?
ok
I've gotten to the point where I can dump the commands
but have no idea really how to send back a kappagen command to the API
is getting to the point where he is dangerous... mwhahaha
but from I can see, the put doesn't really execute a command more than set parameters for it
Heyho,
i've got a question regarding custom CSS. (text isnt working when using custom CSS)
could someone DM me please ?
@pulsar willow i'm not familiar with deepbot but I can help you with the streamelements APIs.
You can have the SE bot saying anything you want, if that's what you are searching for. Btw the overlay ID and the channel ID are different. They are both in the same panel tho.
What you are searching for it's the Account ID to place where the APIs require the {channel}.
Note that you can obtain the Account ID from the JWT token programmatically. (https://api.streamelements.com/kappa/v2/channels/me with the JWT in the header)
hey, sorry just woke up
So what I am looking to do is execute the kappagen command via a different bot
I don't want to bring in a second bot to my stream as it will be very confusing for people
excause my question but: why not only use SE bot?
I am sure all the things Deepbot can , StreamElements Bot also can do if not even better 
I switched bc I had 3 bots set up bc most bots cant do all the stuff I wanted them to do and it all was just clustered. Now that I switched to SE only its much better, plus its very easy to configurate
the issue with the bot is the custom commands
no if statements, no flat file database support
I have no way to convert my most useful commands
SE does all the basics of deepbot yes, but not the advanced
What kind of commands are you using 
just curiouse bc I think I never ran into an issue with SE bot
I've built my own games into deepbot, an arena game based off of tables and charts I wrote, including the ability for someone to generate their own character sheet. it has a shop for after fights to replenish characters and buy weapons upgrades
I play elite dangerous mostly so I have a database with my most used ships and my outfittings for them
What the freak?! 😮
this was all written in the deepbot custom command toolset
ok thats real advanced stuff true
can't do that with the SE bot
I understand your problem now 😃
yeah, painted myself into a corner more like lol
true
is there any way to use the API to execute a kappagen?
I am not familiar with API and all that advanced stuff
but maybe there is a way to trigger Kappagen with Deepbot?
or is it only for updating bot commands, I guess that's what I was most confused on with the documentation
not sure how though Like I said I am not familair with that stuff
oh! gotcha
@pulsar willow I was just thinking. If you just want it for the kappagen command, you could have the bot join chat, but not let it talk. (Turn off all command, etc. It just has to pick up the kappagen command, which I don't think even had a response
no it doesnt have a respond
hmmm I'll look into that
so I take it that it's not possible to use the API to do this?
I'm in the same boat as kiwa. I know there is an API, just not savvy enough to do it. But I am good at making work-arounds
that's a good workaround tbh
ya there is no Run command end point so deepbot/ otherbots cant trigger commands from SE
I'll raise a ruckus, aka post a suggestion
main issue of having an endpoint is that you cant provide whos running the command so there for non mods would be able to run mod commands if there was an end point for it
wouldn't they need your channel ID first?
this would only really work for bots that verify login on the bots website
I suppose that could easily be sniffed
so like running the command from your website
its probly why no bot yet has a run command api
and if it did it would probly require the auth code of the user running the command so they can varify its the correct user
which is imposable to do with what your wanting
well unless every user signed into your website to auth themself with the bot then could use that username to match to taht auth but thats still not safe
doesnt SE have a rename bot feature so you can use your own bot name anyways?
or is that still in alpha
Yeah, it's public now. Anyone can use a custom bot name
then ya just use that if you dont want a new bot name in your channel
nah, just gonna skip it for now. gonna stick with deepbot
My best advise would be to have the SE bot join, and only use what you need from him. Disable everything but kappagen.
Then you or deepbot can write !kappagen, and that's it.
At the best of my knowledge there is no way to trigger the kappagen effect directly via API. You can change the module settings via /bot/modules but that's it.
(kappagen is a module)
@halcyon moth support is better asked in #helpdesk-twitch or #helpdesk-youtube
lock dis
Question. Can I use the count command to create multiple trackings? Like how many deaths I’ve had and how many kills I’ve made? With a way to add to those and then display the count? I’ve tried but the two just add to the same number.
you can make a death counter yep
and using same method a kill counter, but both need to be added manually
@zenith umbra basically you need to make sure you use different variables. So you can do $(count kills) and $(count deaths) and maybe $(count wins)
just make sure they are in different commands, as using that variable will increment by 1 each usage.
exactly
Then you can use $(getcount kills) to get the number without incrementing it
and use !editcount kills 0 to reset
So then the command would have to be “!kills” and “!deaths” to increment?
sure, that would work. I always recommend to make those moderator or above commands, so your viewers don't fudge the numbers, lol
Gotcha
I would do !kill and !death to increment, and !kills and !deaths to getcount
Was going to use kills and getkills
that works, whatever u see more fit
Thanks all seems to be working.
Second question. Lol now that I have chat commands working for counts is there a way to have those numbers show up in part of an overlay. Like the current count?
sadly, no
Ok
it is a requested idea
Sweet. I’ll keep my eye out then. Thanks all!
Hi, are the "Ace Live App" feedback comments to go in this section?
Hmm, this spot is more for advanced users. I know the app has had a lot work done on it, and it is getting close to a new release
@cinder lintel Who or where should I send queries/feedback too if i needed too? Thanks
@subtle cargo you can post ideas here https://streamelements.helprace.com/i374-a-se-mobile-app
@pulsar willow a glitch with the StreamElements API? This channel is for developers who are working with our API.
Well I found a glitch within streamelements roulette function.
^ did you not read what he posted?
@north gulch DansGame calm down
Anywhere I can throw a bug on streamelements.com?
bugs are reported here https://streamelements.helprace.com/s1-streamelements/ideas but what is the issue @spare palm ?
When you're on https://streamelements.com and you scroll down on the home page, it doesn't reset when rendering another component such as the desktop app page or team page
So you mean the fact that it just doesn't jump you back up to the top of the page when you change route...?
Is there ever going to be oauth?
Yeah we wanna add oAuth in the future. 
Any ETA?
streamlabs is compatible with Strea,Elements?
If you mean the StreamLabs OBS, then yes
@cinder lintel if you mean the program I do not use it I use the xsplit
Ok. we are a seperate company from StreamLabs. We don't get alerts from them, and they don't get alerts from us
Can I export all streamlabs information and import it into streamelements? the followers and even those who have donated me?
We have an import tool for tips and your alert box, but the rest would more be manually filling the labels until someone does one of the events
@latent gulch u can use the streamelements extention tool that allows export and import of streamlabs
is there an ETA for Mixer?
not yet sorry
however, support for mixer should be on our ideas board @ https://strms.net/ideas . Give it an upvote @warped pelican to help us prioritize it, and to get updates via email about its status
@finite heath apart from that the site is not loading, thanks
there is an issue with twitch and the bot... seems it is causing a few rate limit issues
@unique nymph can you explain the issue you are having?
@cinder lintel im not having an issue
lol, ok
Anyone around to help with a 500 error I'm seeing? I've been experiencing it for a week or so, but am just now getting a chance to dig into it.
PUT /loyalty/{channel} is resulting in a 500 now when it was working a-okay a couple weeks ago.
Nevermind. It seems you can't set loyalty.amount to be greater than 100. Any reason that would be the case?
@lusty meteor I'll take a look why it is returning you a 500.
It should throw you a 400 with validation errors if the value is too great
Is there a way to retrieve the JWT token via the API? I don't want to require my users to copy/paste it from their channel page.
no, for security reasons that isn't possible
having a better way to have security is planned
I hope that there's a secure way to do that soon. I'd like to integrate with the API in a way that doesn't impose a UX burden for my users.
Yeah, considering oauth is easy enough to implement, it is crazy that it isn't already implemented
@static wigeon It seems now I can't set my subscriber bonuses to be greater than 1000. I fixed it to work around the issue I mentioned yesterday, and then you fixed the validation errors and further broke my system.
Why are there arbitrary limitations on values for the loyalty system?
I agree. @static wigeon is there some sort of security or performance reason that it's limited like that?
I agree too.
@static wigeon can tell us for sure when he wakes up but I do not believe this change was intentional. There were some performance-related changes made to the loyalty system in the last few days at the request of Twitch but nothing that they requested would have changed the bonus limitations.
Alright, thanks. It seems the cheer bonus can't exceed 1000 either. This has completely destroyed an automated system my chat was using for random bonuses to loyalty.
Sorry about that, @lusty meteor
We'll get it sorted in the AM!
@lusty meteor the limit set to 100k now 
show some love for youtube and add song playing feature for chat 😦
quick question around Buying tickets via the API... what exactly needs passing though in the body... as the example just says tickets but it doesn't show a way for the username to be put in
The username comes from the JWT authentication
so if I wanted the giveaway to interface on my website... I would have to have everyone enter their JWT token... is that right @low sierra
Yes, that would be the only way to do that.
surely that is a big security issue for the end user
like realistically how far away is an OAuth solution @low sierra ?
I'm afraid I don't have a timeline for that. I only know it's not something we expect in the near future.
may I ask why that would be the case considering it is such a simple thing to implement?
That's a question for @static wigeon
thanks
@low sierra can I test the beta version of the Android app?
Can somewane help me?/
Are you a developer using the StreamElements API? If not, help is in #helpdesk-twitch or #helpdesk-youtube
@static wigeon are you able to comment on the above from last night?
Is this regarding ticket purchasing?
more around why an end user will have to provide their security token for something as simple as this... But the main bit was around why OAuth isn't expected soon despite it being basic and simple @static wigeon
The sole reason why we haven't implemented OAuth yet is because we are super busy improving other parts of the system.
But i will try and open the discussion around OAuth again to support developers.
it would be a massive help to extend the usage
plus it would help to bring SE up to par with StreamLabs in terms of Dev support
For sure, we wanna add it but we are a small team with a bunch of big plans 😄
I'll keep you updated if there's any updates regarding oAuth.
has anyone here tried linking streamelements to spotify via the 2 new api? I just took a look at your new v2 docs and it looks fairly easy for at least store redemptions to be used to pass song request info and I also see the new beta spotify api seems to let you control song playback including pause/play and playlists trough rest instead of the ultra janky way other bots try to control the spotify desktop app itself. I'm just looking to write maybe a small python app for myself until streamelements adds it to media playback. It would just be nice to just have one bot in the chat room and one stream helping service to deal with. Has anyone already tried this?
Hey,
is there an example on how to use the api with the JWT thing in PHP?
@fringe galleon something like this?
$res = $this->_guzzle->request('PUT', $this->_url . 'points/' . $this->_channelID . '/' . $username . '/' . $points,
['Authorization' => $this->_JWT]);
return ($res->getStatusCode() == 200) ? $res->getBody() : ["Error" => 401, "response" => $res->getBody()];
@unique nymph yeah thanks :). But just the way from the jwt token to the authkey 😃 wich of the jwt repos did u use?
Is there some way to make “Top Tip” the top tip of all time & not the top tip of the current stream??? I don’t see the setting for that. Btw I’m using Purple Flare Super Theme
This is more of a support question but you can change it to all time on the left https://i.imgur.com/QYLXT2W.gifv @vivid linden
Hi first i love streamelements. But a few day my alerts wont show up. I wonder why? I cant use voice chat for the moment. Because im at work.
First of all @reef mango we love you too 
seconde of all let me ask you something, did you change your name by any chance on twitch recently?
Let's take this to #helpdesk-twitch 😃
^
Oh lol sorry newbee 🙃
That's ok. This channel is for developers using the StreamElements API. For general support with StreamElements, please join #helpdesk-twitch or #helpdesk-youtube
Hey, i would like to offer you my help on an german translation as i really need it 😄
@pulsar willow we can give you german support and do not worry, the translation will be done soon, we have a few german speaking people
keine Angst das wird noch, frag einfach was du brauchst
habe schon mit lattemotte geschrieben, wollte mich nur anbieten eine schnelle deutsche Übersetzung für das Dashboard und die Ground Control App zu machen.
@pulsar willow keine Angst, wir machen das, aber gerade Ground Control wird überarbeitet, deswegen macht eine Übersetzung da keinen wirklichen Sinn. Können wir in #welcome usw weitermachen, das hier ist der dev-Kanal, die meckern sonst 

Is there a way to get the progress of an e.g Follower Goal of an Overlay via the API?
There's 2 ways you can get follower goal progress.
- Poll the session api.
- Use the websocket to get realtime events.
Number 2 is the best by far.
So the music from elements use to play a youtube playlist with 200 songs..... Now it only plays like 50 songs from the play list any reason why?
@silk pewter it will be put back to 200 soon
I am not sure if it was intentional or not, but they do plan to fix it back to the cap
How do you save the setting for the media player? For instance the points per song request will not change.
@cursive yew check to make sure all the fields available have a value
if anything is empty, it doesn't save
Hello everyone. quick bot question: if one uses the !command edit functionality, does it add a new one if none exists?
should just give an error, tbh never tried
Hello Devs staff ect i would just like to thank for making such easy and fun thing helping to start streaming, great work and idea THX a lot 😃


Ummm how do u get the command currency and roullette
Is there a mobile streaming app in the works?
@cerulean bison yep, we are working on that. Meanwhile you can use Ace Live Streaming (on Android), it works and has all the basic features for streaming that you could need.
Can I See what the User have Stuff drin Stream Store and i Dont mean the command to Show my own stuff.
@Annis6#0221 not yet but you can look into the Requierments Fields there: https://streamelements.com/dashboard/store/redemptions/items
But Just your own requirements?
If someone bought something from your StreamElements Store and you want to check what they put into the Requirements you can check it via the link I sended here
if you want to check your redemptions you did in other StreamElements Stores you can check them here:
https://streamelements.com/dashboard/account/redemptions
Out of curiosity, are there any updates on web socket documentation?
Do overlay deletions have an "endpoint"?
Previously, I had been told about overlay:update, which emits an event when an overlay changes. However, I'm not seeing events when I delete an overlay.
Used a wildcard event handler to record all socket events 😉 (https://stackoverflow.com/a/33960032)
Is it possible to Change the Name of the bot? Because i want to give it a personality
!gc
!panels
I'm sorry but i dont find the field to paste the oAuth Code in Cround Control. There is no field i can see. And i have overlays with alerts, tipping page ist linked in my panels and i have a twitch account for the bot. And the bot is active
can someone help me please 😄
This channel is for developers using the StreamElements API. For general support with StreamElements, please join #helpdesk-twitch or #helpdesk-youtube
What's the general response time for a question?
In this channel it is longer as the devs don't check in here frequently (quite a busy group). They're also out of the office on Friday and Saturday. I'd say you'll hear from them by Sunday at the latest. I've let them know about your question.
Ok, sweet, thanks 😃
So, I'm trying to convert my custom HTML/CSS over to Streamelements from Streamlabs. Not going so well. Elements aren't aligning correctly, there doesn't seem to be any RGB transparancy support and there's jaggies on CSS transformed divs.
This is my code from SL. I've inspected the div/span elements in StreamElements to adapt, but it just doesn't play nicely. https://pastebin.com/g7g8hKFT
DM'd Alon 
same 
yeah 
Hi all, quick question.. is there a way through the api to kick off a alert in the overlay? similar to a cheer/dono/follow... etc..
@frail wagon hello mate.
So, there is not a "generic" alert that can be triggered via api
however, some events are triggered by some specific apis, for instance, you can create a tip
Via this API: https://dev.streamelements.com/#tips__channel__post
Can Stream Elements only collect donations from PayPal? Or can it take a donation straight from a card?
Well will be accepting more donation methods very shortly. @formal lodge
So Stream Elements, I recently purchased some stream alerts from Nerd or Die. I want to use the stream alerts that I just purchased mind if I can get some help setting it up and attaching them to my stream elements ovverlays?
- this channel is api dev
- NoD usually have an instructions readme in the package
@unique nymph not for StreamElements yet.
@formal lodge feel free to dm me, I’ll try to help you as much as I can.
Is there any way to reduce the burst of performance impact by Kappagen?
I've got it set to 99 emotes at 25px each
and it jumps about 10% CPU when it's triggered
yall hiring? fundev here.
Yes we are hiring engineers. 
@static wigeon chatstats comeback?
@static wigeon can u respond to my pm?
can i talk to a staff about something in voice chat?
If it's dev related you can best post it here @tepid igloo if its support related use the other channels and if needed we can see if voice is available.
its a dev related
i was wounding if you guys have a plan to have StreamElements on a site call Mixer its like Twitch if you never heard of it the site is still new and there not that much bot on it and i like using StreamElements on twitch. If there was a plan of you guys doing that then great i cant wait to use it when i can and if not hope this will let you guys think about it.
This channel is more for questions about using StreamElements API. Mixer support is planned. If you follow this idea, you should get updates on it https://streamelements.helprace.com/i532-add-mixer-account

Hey, does stream elements have a mobile app? I can't seem to find one. I currently stream with streamlabs on mobile (IRL) and am having lots of issues. If there is a stream elements mobile app in development, I'd be happy to help test it. I'm not sure if this is where I should be posting about this. Thanks for your time, I appreciate it 😃
(Android, Samsung Galaxy S9+)
hi @ionic vessel
we have an IRL mobile app in internal alpha right now so not ready for users to test just yet. We'll be looking for additional testers soon and we'll announce it here on discord, so stick around 😃
@finite heath Awesome! I'd be happy to test it out whenever.
How is it going with the Cheer boss ? 😄
@feral ice soon™
Great ! what about the spotify / media request thing ?
@feral ice the only issues we have had with spotify was getting their approval to use their API. only reason we don't have it already
any developers in here for stream overlays? is there any 2560x1080 options for animated overlays? lol
This channel is more for developers that are using SE API. As for the stock overlays there are none at that resolution. They are all 16:9 aspect ratio
bahhhh
quick question as I must be blind... How do I send a test tip / donation?
OK NM I found it

always the case, look for ages, as soon as you ask you find it
OK next question, how do i send the auth token via URL
normally its something like ?token= or something but the JWT page has no good info and the documentation page for SE doesnt help much
@static wigeon
We currently don't support auth via query strings but rather use headers.
There will be OAuth support + better documentation in the near future.
OK then I will have to look elsewhere for now then. I use a custom coded c# notify client that needs to auth via URL
@digital spire Can you add headers to the request?
Hey, There is an error with the dashboard
Failed to instantiate module StreamElements due to:
Error: [$injector:nomod] Module 'StreamElements' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Has this been caught? Is anything being done? 😃
@pulsar willow where do you get this error exactly? On which page?
@vapid merlin dashboard
@pulsar willow see dm
hello. I'm not sure if this is proper place, but is there a way to get SE to generate a whisper to a twitch user? Mor e specifically, generate and then delete
Deletion of a whisper does not appear to be possible. Can anyone confirm/refute this?
I do not believe so, at least that is not something we currently have the ability to do right now
I don't even know if it is possible to delete a whisper that I have sent to someone
I can't seem to delete a whisper once sent through the website
(twitch)
I wanted to implement a notification via Whisper for a giveaway entry. Whispers seem to be permanent!
The other problem is that whispers are much more rate limited than chat is. So the bot could still get in trouble if its whispering people too often.
I think its meant to stop bots from abusing whispers
That makes sense...not being able to delete a whisper is a huge oversight though
But thank you @cinder lintel
👍
no
it s there a change to get in touch with the person who developed the free overlays ?
@uneven arch Yes. I would ask in the support channel for your platform (twitch or youtube), since this is a developer channel for people who work with the API, no designers here 😃
Is there a way to make a Raffle every X minutes?
This channel is for developers using the StreamElements API. For general support with StreamElements, please join #helpdesk-twitch or #helpdesk-youtube
ok
I have an API question
i have some apps that call urls to pull down the json formatted info, etc
since i need some authorization to do that for tips, is there a parameter in my URL i can include, say https://api.streamelements.com/kappa//tips/channel?key=blahblah ?
ok, never mind, i see this is not supported by streamelements searching through the message history, hmm, i'll have to resort to streamlabs for now
@static wigeon ^^
: D
Hey devs what about an API so we pull stats from the stats page like emote usage, top chatters including their amount of messages etc? 
Thoughts? 
the relevant devs are on a conference for the next couple of days, so API answers might be delayed :x
@vital tendon We already have such api.
https://api.streamelements.com/kappa/v2/chatstats/<USERNAME>/stats?limit=100
Which should supply you with everything https://i.imgur.com/MTjH6Kk.png

Interesting, I swear I could not find anything in the API documentation about it though
Thanks a lot!
👍
Neither could I @vital tendon
Is there anything like this /points/{channel}/alltime But for hours watched rather than points
Will there ever be a stream labs app?
Is there a list of everything available in the api that chatstats for example isn’t in the list on the webpage
I'm having a dumb moment. What do I need to put in the header for authorization? I have the jwt string, but I don't think that's it
I guess I'll try
Bearer JWTgoesHere
perfect, now to figure out why the request is working, but nothing is being passed lol..
You forgot to say please?
So you’re getting in, getting the data, but it isn’t going out?
@jaunty lintel
I'm sending a new contest command
and it's just creating a blank contest with 60 minutes duration, no options
so.. I screwed something, somewhere
I got it, I forgot to put the Content-Type in the header
we good
[ ... ]
@static wigeon those chatstats you posted above aren't in the api documentation. Do you have a list of the other stuff that's available but not in the documentation. I'm most interested in useronline as a feature from the Api but would be good to know about everything.
I can half answer for you. The API documentation is probably a bit behind new additions to it, but it was completely updated once we released V2. I know updating the documents is on the list.
as for the second question, what do you mean on the "user online" thing
the watchtime command uses user.time_online to show how long someone had been watching stream for, is that something that is available in the api to return everyone’s online time watching a particular channel.
Thanks for answering btw
@cinder lintel 👆
I'm again going to half answer this one. Since the bot does it, I would say yes, but I don't know details. One of the devs might be able to answer that one
That’s cool thanks, is there anyway to get the devs attention?
Tag him again
Oh is it @static wigeon I need, thanks

😂
Thanks as always @honest bone for helping 😃
No problem
So you are looking for an endpoint to get time watched correct?
Yes please
So we can currently dealing with time watched on a user level which means we don't have any sort of leaderboards.
But what i can try and do is bring it up as a new feature.
could I not use the endpoint and call it multiple times to run from a list of users I have?
I'll try and bring it up internally, but no promises 😉
Thank you
😂
It’s great to have the access like this to you guys, being able to explain exactly what we want is awesome
Agreed
holy cow, that leaderboard
I'm around most of the time if you have any questions at all.
@grand wing Just for testing 
😄
Oh one more thing, is there any chance of adding another feature to be able to merge users time. When a user changes their name, sometimes it still recognises the old user name and other times it doesn’t. In one channel I have 4 different names I need to call on the watchtime command to get all my hours
@languid niche Here's some good news https://i.imgur.com/sOcGgyT.png
You are amazing, thank you so much @static wigeon
Not yet, gonna deploy it first thing tomorrow.
/kappa/v2/points/5abe9177eda0b6bab3880b82/watchtime/100
That's the point tho.
Wow that quick, you guys are awesome. I can’t say it enough

And the new watchtime endpoint is live.
https://api.streamelements.com/kappa/v2/points/5a81f82ab932430001b71ed8/watchtime?limit=100 enjoy 
why does it happen
Cause it hates you
nice to see you in here @livid lotus 
@static wigeon is it limited to just 100 or is it possible to search it too?
I'd recommend doing a limit of 1000 and then using offset
@static wigeon im working on the angular now, please dont disturb
Oh right 
Cool thanks
Hey, is there a way to trigger the bit alert via the API?
Might be something we add in the future.
There is an API... Oh boy... This I will be messing with
Who is the developer on the Cheer boss ? 😃 is it okay to make suggestions ? 😄
@feral ice make suggestions on the ideas board: https://strms.net/ideas
hey guys, quick question. Who can i talk to regarding bugs in the overlay editor? 😃
Are there any SE socket docs? Or am I just blind?
@mild cipher It is currently being worked on.
const io = require('socket.io-client')
const accessToken = '';
const socket = io('https://realtime.streamelements.com', {
transports: ['websocket']
});
socket.on('connect', onConnect);
socket.on('disconnect', onDisconnect);
socket.on('authenticated', onAuthenticated);
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')
}
function onAuthenticated(data) {
const { channelId } = data;
console.log(`Successfully connected to channel ${channelId}`);
}
function onEvent(event) {
console.log(event);
// Deal with events
}
Here's a snippet if you wanna get going with events.
Ah thanks. I searched through discord and found your snippet in a reply to someone else which I've been using 
It seems to work fine for a while but then for some reason the connection closes or there's some kind of degradation and I'm not sure why
I was hoping to read up on it.
For now I'll try to have it open in browser instead of OBS so I can check the console to see what's actually happening 👌
What error does it close the connection with?
That's the thing, I'm not sure yet as it always starts off fine for a while, but then later it doesn't seem to process events. I haven't been able to check the console as I've sent the file to another streamer to use in OBS).
What I'll try to do is have the connection open on my side as well so I can monitor it.
Sounds good, I'll be here to help.
And also documentation is being written as we speak
@low sierra
hey, told to ask here if anyone had a list of variables that can be used in the custom event list. trying to port one over from streamlabs
Hi @nocturne loom we currently don't have a guid to convert between SL and us. you can see the default example for custom event list and work it from there
hey peeps, can someone tell me what the token is in the activities api url and whether it ever changes?
https://api.streamelements.com/kappa/v2/activities/ 58ee4c2680e18710ec9efe20 ?limit=100&types=...
That is the account ID and does not change
sweet cheers!
another question - is it possible to paginate the activites results in order to get ones older than the 500th?
oh actually don't worry about that one

oh wait sorry I take it back - is there a way to see past 500 activity results?
you can see 500 of 1 event. other than that, no :/
alright, idk what im talking about, styler will help you 

😮
So we do support basic pagination via limit and offset.
perfect!

thanks styler!!
@static wigeon any update on OAuth?
@unique nymph Hey there, so we got OAuth added to the pipeline and we are hoping to get going within the next weeks.
Yay we have a rough ETA <3
Just a question and thought it would be mostly related to this channel. Will Stream elements ever have a thing like Stream labs's version of OBS?
@vagrant anchor this is for people working with the api we provide. These kind of questions are for #💭︱feedback-and-ideas, or #general-chat. But in answer to that, we will not be doing a hard-fork of OBS like SL did. We think that the OBS devs do an amazing job. If we do anything, we will do a plugin to the current OBS software 😃
I LOVE THE NEW TWITCH extensions! EXCEPT!!! The countdown to start doesn’t allow for a 24hr clock so starting at 3pm for instance is impossible 😦 currently the clock starts at 12 midnight & only allows up to 10am
@vivid linden This is being fixed right now 😃
thanks @low sierra btw, i love and miss you
what about me?
@livid lotus 
@livid lotus 

👌
@static wigeon do you mind if I DM you?
sure.
U guys probably already know but just in case... the timer for the countdown does go tip to 24hrs but it is maybe off by a day somehow? I programmed tues-sat at 15:00 CT and it shows as wed-Sunday instead :/
Or maybe because it is GMT based, we need to set it a day back!!! I’ll try that
Nope! Even when I set it a day before it still shows me as streaming on Sunday. I don’t wanna work Sundays lol!
Yeah they know I've brought it up too @vivid linden . They said it's a known bug
and something we'll be fixing ^
hi, i was wondering if i can speak to someone about some custom code questions i have. i was referred here by a live chat representative
like I stated in #helpdesk-twitch, you should ask the question
then someone will answer when they get the chance
id like to know if the SE alert box supports custom CSS and HTML
the live chat rep told me about the event list but he wasnt sure about the alert box..im currently using stream labs, would the code be the same or would it be a bit different..for instance i know i cant use the same code between MUXY and Streamlabs
If you use our import, it should import just fine. Let us know if it doesn't
ok ill give it a shot. which channel should i go to ask about some bot commands?
well, a very specific command
thanks
@cinder lintel so the code doesnt seem to transfer over, just the webm animation. i also tried using my CSS for the custom event list whcih doesnt seem to work either. So i guess my question from earlier still stands, what would need to be changed to make it work on SE
hmm, this would be the first time I have heard that it didn't come over smoothly. What parts are not working?
start with alertbox
the text
which i pull "new Subscriber" and the username from streamlabs
so i assume the id's are different possibly.. right now its <div id="newSub">NEW SUBSCRIBER</div>
<div id="name">{name}</div>
as far as I know, {name} is correct, but it could be something else. I am no expert with these advanced things
best thing I can recommend is to create a new alert box, turn on the CSS, and look at the basic example that is provided
it has comments in it to explain all the parts, but thats about the extent of my knowledge
ill take a look. but is there anyone i can message perhaps that may have a little more experience in this area..you've been very helpful so far\
Hello, can i get my api key, please?
@pulsar willow its in your profile, top right
!jwt
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
yeah
Ohh, thank you!
Developers you so sexy and awesome!

Hi all, was sent here regarding a question about importing my own custom list of viewers/points... is there any chance i could get a sample csv sheet so that I can see what the labels/headers and format is?
I have researched all over and can't get it to work
i didn't activate points on my other bots but downloaded my follower list and created a csv where i manually added points based on the length of followership and participation. I want to import this as a baseline for Streamelements loyalty to build on from here on out? help pretty please 😃
❤
@uncut spade This would more be fore #helpdesk-twitch (this channel is for advanced users and the API). If you get the format into username,points (csv format), we have a good way to import that
Ok, thank you so much
my apologies, wasn't sure where to ask, first time on here and new to SE
heers
*cheers
If you can put together a walkthrough on how to set it up, it will make it a lot easier for everyone
There is a readme section in first lines of php file
@low sierra, can we get this added to the #command-share channel?
mm I think it's best in this channel as this is definitely more advanced than the copy/paste examples in #command-share
I'll pin it here.
Hi. I have a small problem. Is there any way to urlencode stack for customapi command? It seems it doesn't atm (so "test test2" is not "test%20test2") which generates error 400 on server side.
However I am surprised, but there is a command share with example "New York City"
I think $(queryencode) might be the variable you're looking for
$(queryescape) does the same
Thanks. IDK how I missed it. I found ${pathescape ${1:}} as well, so I used it (but yesterday plain {1:} worked for me 😉
yep, I've found it works without sometimes (like in the weather command)
Maybe it should be implemented as default in customapi, as every URL has to be encoded?
This script allows you to add command !daily which returns most active users this day.
It seems that chatstats endpoint is not updating
Hi could any one help me with streamelements api for a second? thanks!
Its best to ask the question, then someone that knows the answer will be able to.. well, answer
Ok thanks! Im just figuring out how the store redemption post resource works maybe anyone have done something with that?
have you checked out this: https://dev.streamelements.com/#store
yes
im not sure about the body and what bearer token i need the owner of the channel or the one is doing the redemp
Are you looking to see what was redeemed, or get notifications, etc
I personally think you need the broadcaster's JWT for authorization
no, im looking to make a call to redemp a item
ah
then I will walk away from this one. I am not that savy with this part of the system
I tried
there are much more knowledgable people in here, who will answer eventually on that
haha thanks! 😄
right know igot a 400 http code so im doing a bad request
I got a redemp... but as was my bearer token it said i have bought it LUL
I think when doing a post, you want the jwt of who is redeeming, and the channel ID for the channel you are redeeming from?
best guess
lol
yes
i dont think i can get the jwt of the redeemer from the api
will check the resources
no, you would have to have them give it to you
that much I know
its a security thing to not be able to pull it
well with a simple oauth :<
which we don't have yet
maybe i can embed the the redemp button to redirect to streamelements web?
Fer: error 400 is mostly because of bad request, for example unescaped parameters
I had same issue with my own server when i tried to put data with spaces instead of %20 in URL
Yes thanks I have fixed it, but now im just looking for get the bearer token of the user or just redirect to the item they want get redemp
Also I see no method for redeeming an item, only to get past redeemptions
yes there is a post method
i have done with my own bearer token so it says i have bought it, but i have to figured out how get the ones from the users, maybe like @cinder lintel said, maybe with the api, or just redirect to the store...
it is a post cuz sometimes u have to post a body
if the item claims a field
Endpoint name is tricky. I think it should be redeem/{itemId} instead of redemptions/{itemId}
Also - I think unregistered (on SE) users have no JWT
if they redeem through chat, they are unregistered. but if they redeem through the site, they have to be logged in
yes they have to login to redeem
So i think you should keep database with users' JWT. User should copy it on his own. But... I would not provide my JWT to anybody, and there is no possibility to generate JWT with permission to one channel or set of privileges
Yes so i cant make it :< and feels like there is no option to embed and redirect to the item, you only can go to the store
It would be great to make something like: https://streamelements.com/ChannelName/store#itemId which popups redeem modal for that item
@static wigeon can you pls pin my another share post with daily stats, or put into your repo (if there's any) ?
I personally used pisg as chat stats, but SE API is nice to make simple stats

Hey guys. I'm having problems with your store API. Maybe I am confused, but I am requesting at "/store/<myChannel>/redemptions/<redemptionID> and it's returning no results. I even did a get to all redemptions and plugged the "_id" value and copy-pasta'd. Am I missing something?
Sorry, it's returning Error Not Found
@pulsar willow what's the full url you are requesting?
I have the authorization token in the header.
Wait, does it only work for specific redemptions, and not redemption types?
@vapid merlin ⤴
sec
@pulsar willow - where did you take that redemption id? 5b089a3e0ddc666160efbfb7
thats actually a store item, not a redemption
to get all redemptions - GET: https://api.streamelements.com/kappa/v2/store/5938466dfcebba73eba9947a/redemptions
windows is updating... wish me luck. I'll be back in a bit.
Tell my children I love them!
⤴ this works with pagination, so you can supply query string of offset and limit (https://api.streamelements.com/kappa/v2/store/5938466dfcebba73eba9947a/redemptions?offset=100&limit=50 will give you results 101-150)
Is the list sorted by CreatedAt I presume?
Is there any way to have the bot say something in the channel chat via the API?
@pulsar willow yes, there is another endpoint to perform search
i have a question! is there any other choices for stream overlays other then the ones provided on streamelements.com?????
This is not really developer related, but you can always make your own using the SE API, or check #art-marketplace
https://api.streamelements.com/kappa/v2/channels/sebbity/emotes returns
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "An internal server error occurred"
}
for me (not that I have any emotes, but I do have bttv ones) - am I doing that right?
@silent night channel is your SE account/channel ID
which is found with https://api.streamelements.com/kappa/v2/channels/sebbity
or from the dashboard account page
Don't see an appropriate channel, so I hope it's okay to ask in here.
a) Will we ever get a decent editor for custom CSS alerts? non-resizable window that exists right now is straight up abominable. At least make us able to change the size of it?
b) Tooltips on a whole implementation are bad. Especially the HTML part of it.
c) Comes from b) - If I'm using a webm video in my alert that originally has sound in it - it will some times play even though I set "muted" attribute. Sound doesn't play in preview, but does in obs (and only in like 1/10 cases), which is kind of curious. More importantly volume controls that exist on site are not working properly if I'm using custom CSS. Tried using <audio> to create a separate track for that, doesn't work as well. Halp
d) How do I get user message into my custom alert (for tips for example). I can see that username and amount are handled by JS and query selector, but i have no idea what would selector be for a user message and there's no documentation on the matter.
e) amount of months for subscription as well
@true ridge
thanks TerraBuck, I didn't realise specifically required the channel to have an SE account 😃
How does one change command permissions using text commands.
Im trying to make a command Mod only but cant seem to find any documentation on how to do that
and this is done remotely through twitch chat
@small jungle c) - if you use muted attribute of <video> tag, it is an browser issue (OBS), you can check it if you open overlay in browser and look at source. d, e: selector depends on a field you want to use for it. For example
HTML:
<div id="username-container"></div>
<div id="message-container"></div>
<div id="months-container"></div>
<div id="sender-container"></div>
JS:
const name = '{{name}}';
const message = '{{message}}';
const months = '{{amount}}';
const sender = '{{sender}}'; //if it is a sub, which is a gift, sender is a person who bought a sub
const userNameContainer = document.querySelector('#username-container');
const messageContainer = document.querySelector('#message-container');
const monthsContainer = document.querySelector('#months-container');
const senderContainer = document.querySelector('#sender-container');
userNameContainer.innerHTML = name;
messageContainer.innerHTML = message;
monthsContainer.innerHTML = months;
senderContainer.innerHTML = sender;
@viral patrol thanks for the help. Are there any documentation on this if I will need more selectors in the future? because they're different across most alert platforms =/
In regards to the sound of muted video - I figured it out and it only happens once after I press the "save" button in the widget editor and play a test alert. Doesn't happen after the first time.
I am not sure if there is a documentation. And there are no more variables for subs/tips/hosts. There is always {{name}} - a person who triggered alert, {{message}} - a message attached to event, {{amount}} - number of viewers from host, tip amount, months subscribed, cheer amount,
what about gifted subs? because those should in theory have two name variables, the gifter and the gifted?
Those are variables passed from SE, and about selectors - it only depends on your code, what ids of divs/spans/paragraphs and so one do you have
Oh... gifted sub - This one I have no idea atm.
Let me check it. I hope I will have answer for that
OK. Took a look at source code and there are way other variables than those forwarded, so at this point I am not sure if {{sender}} is a correct one
"Has resubscribed for <strong>{{ ::count }}</strong> months",gift:"<b>{{ ::sender }}</b> gifted <b>{{ ::username }}</b> a subscription!"}
As you can see, there is "count" instead of amount. "username" instead of name.
So there is somebody with more experience needed
yeah. Will try both in the meantime and see what works I guess. Thanks once again for your help 😃
OK. It is {{sender}}
Corrected the code I pasted before, so it has all variables that I am aware of at the moment 😉
@small jungle ⤴
And about a) I personally use standalone html editor, to check align of blocks on my pc if everything seems to be OK i paste body, script and style sections to SE overlay editor. It is way faster than checking on SE (just ctrl+S > F5 in browser instead of saving, triggering pop-up)
Thanks a lot for the help @viral patrol !
Sharing is caring 😉
Oh, and I wonder if there's another variable, which would make alerts more viewer-targetted. Profile image URL. It would be nice to include it into alertbox. It could streamers opportunity to create alertboxes like
(i know there is user image on SE end, as they are displayed in SE: Leaderboards twitch extension)
not for certain, those might be loaded from twitch
i dont believe we store any images for users that are not signed up to us, which is often the case with random viewers who sub/donate
But you store avatar URL
Or at least you already got a method to obtain this data as it is used in leaderboard extension for twitch
yeah that is coming from Twitch
@viral patrol if you're still around there's one more thing I'd bother you with 😄
cheer alerts. The "cheer" icon itself. When I was using muxy I was pulling it with {bit_image} in HTML, what do I need to do with SE? 😃
nvm, took a longer look at how it's set up by default here.
hello
i need some help
so im trying to use the api to add points to me
and it returns that it worked and that it added the points
but it doesnt actually add the points
im using python
import requests
jwt_token = 'Bearer <token>'
access_token = 'Bearer <token>'
twitch_r = requests.get('https://api.twitch.tv/helix/users?login=adure',
headers={'Authorization':access_token}
)
r = requests.put('https://api.streamelements.com/kappa/v2/points/'+twitch_r.json()['data'][0]["id"]+'/Adure/500',
headers = {"Authorization":jwt_token},
)
print(r.text)```
this is my code
not sure why its not working
There is wrong order in your URL
Check PUT request https://api.streamelements.com/kappa/v2/points/adure/adure/500
First one is your channel, second one is your nickname
I am pretty sure both are lowercase
nope still not working
and the first one was my channel
it was my channel id
twitch_r.json()['data'][0]["id"]
Oh. But it really seems to be strange if service replies with success message
yeah thats why i dont get it
it returns a success message but doesnt succeed
anyone else have any ideas?
Does adding points by command on twitch chat work?
If no - there is something wrong with storage itself if yes - maybe a controller for this API method
@nova parcel 
https://api.streamelements.com/kappa/v2/points/{channelId}/Adure/500
channelId = your SE channel id
yup, the one you have in your account settings
so you could actually skip the first helix request as well

partly our fault on not enough documentation on the API docs
yeah lol and i didnt even find this page for a little while https://dev.streamelements.com/#
but whereever you see {channel} in the api, it is your account id.
i was going off of https://github.com/StreamElements/api-docs
oh yea, thats the new one. still being worked on by @low sierra
a bit more readable
oo nice thanks
but still, very much incomplete at the moment
if you have any other questions - ping me
alright will do appreciate it
can you do one for pulling out euromillions winning numbers ygolde? 😄
yes, but only last week's numbers
xD
@grand wing https://streamelements.com/ygolde/tip
that will just make me have less money, I think I didn't explain properly 😂
unless it's an investment 🤔
ahh, yes - yes it is.
😄
Can stream elements please put in the thing where you see your top chatter
@pulsar willow this is the wrong channel for an #💭︱feedback-and-ideas. Plus we have Chat Stats, which shows more than just the top chatter
Anyone have an example of how to mark a redemption complete? I GET the json object, change the completed value to true, and then PUT it back and it doesn't go though. Maybe I am doing it wrong?
I'm not getting an error, so i think I'm doing something wrong.
I'm streaming the development of my plugin that uses your API any help would be useful.
I'm kind of stuck.
@vapid merlin maybe could help? idk
I wish I could help, lol. API isn't my expertise
Y'all have a c# example? It's getting frustrating.
@pulsar willow the dev team is EU based. Someone will be able to reply in the morning
👌🏼
Since I am going to miss them, let me leave this question. In the https://dev.streamelements.com/#store__channel__redemptions__redemptionid__put example, the ID is 58ff89431afff64e61f6a1f1 but in the body that ID isn't listed. Could I get clarification as to which ID is the redemption id? Is it the redeemer._id, or is it just _id? I think I've been using the wrong ID and have been submitting items, rather than updating them.
My goal is to update the "completed" parameter to true.
or is it item._id -- you guys have a lot of _id parameters.
I look forward to the response tomorrow. ❤
@pulsar willow the redemption id 58ff89431afff64e61f6a1f1 is just an example one, you need to give your own redemption ids
@pulsar willow I sent you in a dm the api call to get the pending ones
@vapid merlin I don't have a problem getting a redemption. Regarding the example, I agree, but the example should be reflected in the items below the example... should it not?
I have a problem using the PUT method to change a value. I get error 500 - which is likely that it is not in the correct format. In your DM the parameters are listed in the URL. Are you suggesting that I can put &completed=true in the URI and that will change the value?
@pulsar willow can you send me in a dm all the API call details and headers?
The exact one you are making
@north nest heya its me frOKm the mobile app stuff
any dev can help me out by any chance? 😃 i need to prevent scaling of images (want to keep it in its original size). how i can achieve that? 😃
@floral condor are you talking about in the overlay editor?
yeah
that would be something for the helpdesk channels then, this is more for coding issues on people using the API
i added an alert box, uploaded an image for that, but its being scaled, but i would like to keep them in the original size 😃
aight, got told to go here with any type of coding question (Css stuff maybe?)
but i got your point 😃
More API related, though CSS could be something discussed here. As for the alertbox thing, as far as my experience there is no way to keep them the original size. One thing you can do is just insert the image in its own widget for scale, size the alertbox to match, and remove the image widget. If all your images are different sizes (for different alerts and such), you can add additional alert boxes, and uncheck the alerts you don't want to pop in that alert box
waves
hhaha you got your role
hmm breaker of things.. I must get this achievement.
is there a way to run a put with a chat command
with the bot
json put **
also no custom CSS toggle on the store redemptions widget 🤔
Not sure if to ask here but is there a way to see the code behind the basic latest follower widget with scrolling text? I'm trying to create a long bar with scrolling text which has latest follower, sub, tip and top tip all scrolling one after the other. I don't want anything fancy, they'll be the exact same as the standard widgets, just coming after each other. But I barely remember CSS and stuff and the custom event list widget as it it boggles me a bit, so I was hoping I could see what's behind the latest follower widget so I can just replicate it for latest sub etc.
This is what I use for that
But I am not sure what variable sits behind latest followers list
@viral patrol Hmm ok thanks, I'll see what I can do 😃
@open haven ready solution for you below
Latest events as marquee list:
HTML:
<link href="https://fonts.googleapis.com/css?family=Bubbler+One" rel="stylesheet">
<p class="marquee"><span id="best-chatters"></span></p>
CSS:
.marquee {
width: 450px;
margin: 0 auto;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
}
.marquee span {
display: inline-block;
padding-left: 100%; /* show the marquee just outside the paragraph */
animation: marquee 15s linear infinite;
}
.marquee span:hover {
animation-play-state: paused
}
#best-chatters{
color:rgb(0, 0, 0);
font-family: 'Bubbler One', sans-serif;
font-weight:bold;
}
/* Make it move */
@keyframes marquee {
0% { transform: translate(0, 0); }
100% { transform: translate(-100%, 0); }
}
Cannot paste JS
I hope this is what you wanted to achieve @open haven
@viral patrol Oh thanks man! I'll check it out later, will be afk for a bit 😄 appreciate it
New version of spotify snippet. Changes:
- Added protection - song can't be twice on playlist
- Translatable messages in config section
- Added header Access-Control-Allow-Origin: * so this script can be called from overlay
Can you unpin old spotify and pin this one (I already removed previous upload)
Hello everybody, I have a small question/issue I need help with.
Recently I wanted to use some animated overlays and a friend told me to upload them to SE and use them as browser source in OBS.
Now when I switch Scenes it can happen, that the overlays aren't loaded in when the scene switching is over and just after a second or so they pop in.
Since I'm in Europe I thought this would be because those files lie on US Servers and because of Ping/Latency it would take longer than I like for those files to load.
After contacting support they said that SE has servers all over the world.
Now my question is, how can I determine which server my files are located on and will it be possible that, at some point in time, you can choose your server, so you can get the best connection so those files are loaded as quick as possible?
File size is already optimized and I got a quick enough internet connection so I think my problem is mainly the connection time to those servers.
Also if anybody has a clue, can you tell me if it is better to load those animated webM overlays into OBS as browser source with SE or to let OBS read them directly from the PC?
I did some quick testing and came up with a 3-7% increase in CPU usage when using the webMs directly from the PC.
Thanks in advance for the answer 😃
@plain yacht this channel is for advanced support for using the API (hence the channel name). We can help you out in the #helpdesk-twitch channel
ok sry, support said to write here 😃
I saw a command @ #command-share with spotify "current playing", but there is a small issue in that snippet (I faced it when i was creating my script). Access Token expires and refresh token is provided on same request as access token, so it has to be updated every few hours in command.
@low sierra 
There might be*
The solution to go around that is to auth user and store (or provide) both - auth and refresh tokens. They can be provided as encoded GET parameter (so it is a bit safer to store them than plaintext).
Interesting, I'll take it down and monitor it. Thanks
Hey guys, How can I set a command that will count wins for Fortnite for example? from the API i assume
<?php
if (isset($_GET['username'])) {
$username=$_GET['username'];
$update=file_get_contents('https://api.partybus.gg/v1/players/'.$username.'/update');
$data=file_get_contents('https://api.partybus.gg/v1/players/'.$username.'/history?p=');
if (strlen($data)){
$data=json_decode($data,true);
die ('Today I\'ve got ' . $data[0]['kills'] . ' kills in ' .$data[0]['games']. ' games. I won ' . $data[0]['placeA']. ' times');
}
}
Bot command response:
${customapi.http://path.to.script/script.php?username=XXXXXXXXXX}
Gonna check if it works
It works.
However I am not sure how partybus.gg is reliable as I never saw fortnite and it seems, their api is not open, but I extracted it from website
@last thunder ⤴
Oh. You wanted to count wins, not kills 😉
Thank you so much @viral patrol !
so im assuming we run this api on our own "setup"
Yes. If you have a hosting, where you can put php script, you can run this. Maybe somebody will share it on their own server and put on #command-share 😉
looking at it. doesnt seem to be able to do what im thinking
but still a good thing to keep in mind
actually you might know more @viral patrol
im still kinda scrub at api stuff. does the documentation have something for pinging with a specific chat command
like i want to do !light <hex>
grab the <hex> and parse it into a post for another api for my lights
Sure you can!
You can put mitm (man in the middle) for that purpose if your light api doesn't support GET parameter
Also - you should hide this command from command list, so nobody can get your URL
yeah
Oh
so would i just setup a webpage
and itll link to that page when the command goes off using the api variable in SE
Oh how did i not see that
Just like that. setup a webpage which forwards light=XYZ GET parameter to your API as PUT request
thats genius
now to figure out how to parse that
would it be just like setting a flag in the URL
that is the <hex> var
and having it grab that
and use it in the put request
im still super noob at this
Bot response:
${customapi.http://script/?color=${pathescape ${1:}}}
will allow you to forward !color #FF0000
and just use like getURLparameter or something in jquery to grab it as it comes in and then run it
oh
im excited now
gotta remember my login for my web host
to upload all this 😛
Not url parameter from javascript, as I am pretty sure bot won't execute javascript
You need something serverside
(if it is not node.js server)
no idea
i dont think so
its just my website
i was gonna use
but i could figure out php for it
<?php
$url='http://url.to.your.api';
if (isset($_GET['hex'])){
$data = array("hex" => $_GET['hex']);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
$response = curl_exec($ch);
if (!$response)
{
die('error');
}
die('ok');
}
Something like that
i understand some of that
oh
they have documentation
for php
on the lifx website
ill just show you waht i was looking at
<?php
$link = "https://api.lifx.com/v1/lights/all/state";
$authToken = "YOUR_APP_TOKEN";
$headers = array('Authorization: Bearer ' . $authToken);
$data = 'power=on';
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$response = curl_exec($ch);
?>```
so its putting the hex value into the $data tag
section
would i use the if isset part at the top
<?php
$link = "https://api.lifx.com/v1/lights/all/state";
$authToken = "YOUR_APP_TOKEN";
$headers = array('Authorization: Bearer ' . $authToken);
$data = 'power=on' , 'color='array("hex" => $_GET['hex']) ;
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$response = curl_exec($ch);
?>```
or am i just jamming pieces together that do nothing 😛
php 
that's better 
document.getElementById("lx".innerHTML = "Big thanks!";
i legit have no idea how to properly incorportate @viral patrol script above into the example their site gave
latte typing from the offline realm
<@&452524198355533825> just a reminder...
harsh 😛
i have no idea how to parse the hex variable into their now
cause i just have putting it into an array now but not assigning it the color tag to go along with it in the $data package
i just realised the URL you parsed automatically did that
im such an idiot
so
im guessing the php file should still come up with something if i manually go to that url right
like in the console
so it can find the file but does nothing
no errors or anything
document.getElementById("lx".innerHTML = "Big thanks!"; - you forgot to close getEementById method 😉

So... What is an issue now?
Does it work @sturdy socket ?
no.
like my browser can load the page and it doesnt 404
and i can add the ?color=#ff0000 to the end of the url but i get no response
ill dm the url
im an idiot
OK. Is the snipped you pasted a current version?
This one:
<?php
$link = "https://api.lifx.com/v1/lights/all/state";
$authToken = "YOUR_APP_TOKEN";
$headers = array('Authorization: Bearer ' . $authToken);
$data = 'power=on' , 'color='array("hex" => $_GET['hex']) ;
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$response = curl_exec($ch);
?>
If so: one of your parameters is an array and the second one is string, it should be array with http_build_query after assigning vars
<?php
if (isset($_GET['hex'])){
$link = "https://api.lifx.com/v1/lights/all/state";
$authToken = "YOUR_APP_TOKEN";
$headers = array('Authorization: Bearer ' . $authToken);
$data = array("hex" => $_GET['hex'],'power'=>'on');
$ch = curl_init($link);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$response = curl_exec($ch);
}
Not to mention: you have _GET['hex'] and you try to call it with ?color= instead of ?hex=
😉
Can you paste it wihtout your api key?
<?php
$url='https://api.lifx.com/v1/lights/all/state';
$authToken = "API KEY";
$headers = array('Authorization: Bearer ' . $authToken);
if (isset($_GET['hex'])){
$data = array("hex" => $_GET['hex']);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
$response = curl_exec($ch);
if (!$response)
{
die('error');
}
die('ok');
}
?>
oh
i should be using he
hex
u right
so i just got an ok response
but nothing happened with the lights
<?php
$url='https://api.lifx.com/v1/lights/all/state';
$authToken = "API KEY";
$headers = array('Authorization: Bearer ' . $authToken);
if (isset($_GET['hex'])){
$data = array("power"=>"on","color" => '#'.$_GET['hex']);
}else if (isset($_GET['color'])){
$data = array("power"=>"on","color" => $_GET['color']);
}
else {
die('No color provided');
}
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
$response = curl_exec($ch);
if (!$response)
{
die('error');
}
die('success!');
}
?>
try this one to check the response from API
Fixed my snippet as there is no "hex" in call, it is colour on lifx endpoint
But Token required - huh..
Ermmm.
im guessing its the auth thing
found it
oh
headers were set, but they didn't go to curl options
ahhh
okay
so im getting
{ "results": [ { "id": "d073d5002477", "status": "ok", "label": "Left" }, { "id": "d073d5140360", "status": "ok", "label": "right" } ] }
its just parsing back the bulbs status
so that should be working
cause thats the response it should give back if it works
lemme put in a bad var
like that response is a valid response when it works
but they dont change color
u wot lifx
Check if color is forwarded correctly snippet updated
thats the thing
if it wasnt it would say color invalid or something
cause if i make ?hex=fuck
or some invalid string i get
{ "error": "color does not have a valid value", "errors": [ { "field": "color", "message": [ "does not have a valid value" ] } ] }
okay
so its working with text
i dont think its parsing the #
if i use "blue"as the string
it works
ah
is used as "go to id" in html
but if someone does say blue it will error
Huh.
Snippet updated. You can do two commands: !hex which will forward color without '#' and !color for color names
ohhh
You can also do a regex check on color to determine if it is hexadecimal or name
But two seperate 'calls' are way easier 😉
i dont think thats needed. ill just tell peeps if it errors you dun goof'd
used the right syntax
ye
so
should
still work
as !hex
Yup




i sorry i so dumb with this
KISS, Keep It Short & Simple
