#dev-chat
1 messages · Page 23 of 1
Thank you so much
let name = '{{name}}';
nameChecker();
function nameChecker(){
if (name == "keizar"){
document.getElementById('amountHolder').style.display = `inline`;
}else{
document.getElementById('amountHolder').style.display = 'none';
}};```
Just note, that this is my html:
<div class="sign-text">
<p>
{{name}} <br>
has just subscribed<br>
<p id="amountHolder">for {{amount}} months</p>
</p>
</div>```
so it will show/hide amountholder div based on the name, but you should get the idea behind this
you can show/hide an entire div you want to
just copy paste the JS part I quoted above and change the name to theirs
but in the sub alert
or the variation sub alert
and make sure you make a <div>/<p>/<img>/<video> for what ever you want to show
and add the ID of them to the show/hide parts of the JS
Is it possible to make the gif from follower alert smaller ?
im not using custom alert
it's just a gif
resize the alert widget in your overlay?
but all the alerts will resize then not only the follower right ?
and for the sub I'm using a custom alert
You would either have to use separate alert widgets then, scale down the source, or use custom css for that alert as well
how do i use separate alert widgets ?
you create a new alert widget, and then just make sure you dont overlap what alerts are set in the different widgets. I personally use 2 alert widgets, one for most the alerts, and then one only for cheers so I can have it on a completely different area of my screen
I would not recommend using a separate widget for every alert, it might get wonky with that many in one overlay
So i looked through the pinned messages, and I cant find any information on how to access the 'obj' object that gets passed into the functions for the custom widget.
i'm assuming its the json data from the twitch api.
my main question is "am i able to access that obj outside of the streamElements editor?"
my question (might not even be the right one) is what is your end goal
testing my code in a separate environment. the code i want to work with is like 200 lines long, its hard to manage on the tiny window we get in the editor.
ahh
@viral patrol might be able to answer that with how he handles it. He has made quite a few cool widgets so far
@glad root Its best to use an external editor like Visual Studio Code
when you think its working, just copy paste it
If you want to debug the JS, just make an html tag and append text/result to it tosee whats going on and use the console for any undefined stuff
the built in small editor is not meant to be used like a normal editor for code
oh for sure, the issue i was running into was when i would copy from streamElements to my editor, the code would stop working. I'm assuming its because the stream elements has backend code that isn't accessible. like defining the obj object that gets passed into the functions. so my editor is missing that and thats what causes it to stop working.
Well if you can manage to connect your editor to the twitch API, you will have to make your debugger ask for an event, or more like your debugger to simulate an alert in JSON format and pass it towards your OnEventReceive event
which of the 3 is not defined in your editor and which editor are you using?
i assumed it was 1. since i'm not passing any data in to pull things like details and event from. so its not really listening for anything
Well you will need to call the event in your editor if you want to simulate an event and pass it 2 arguments I guess
I'm not sure how event handling is done in JS, as you can define a function in the arguments it can take really

but I've had no issue my self declaring all 3 like that
and processing alerts or events in the editor it self
I may be understanding it wrongly as well and most like LX will poke you tomorrow if I'm wrong or something to add
@indigo flume hello just a quick question how do i go about getting an api invite code? :)
Oh sorry my bad am i in the wrong section for this ?
completely wrong section, API = Application programming interface
@wooden ledge The app is currently in closed beta, and is expected to be available to the public by mid October.
If you'd like to assist with beta testing, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
@floral fable iv filled it out hopfuly i can get in
hey guys. I've been doing some vague research into this and have a question. I'm attempting to build a command (not an widget event) but a command that users can poll to check how many bits they have cheered total.
Now, some of you may ask, why. well. I like to be through and this will help me in the future to have it at least accessible via commands.
I have two thoughts, and no leads so far. First thought is the stream elements extension leaderboard. That leaderboard has all the bits cheered since my first day, I just have no idea how to access the data.
I assume it's done though this twitch api .../api/reference/#get-bits-leaderboard but again, I'm not sure how I could use the twitch api within custom commands. any thoughts, questions?
I mean, strictly speaking, if the custom commands where on point, I could be able to poll any of that data with one or two commands. #LifeGoals
Someone from Helpdesk-Twitch suggested I post in here. I purchased a Streamlab based alert package that I'm looking to transfer over to Streamelements. Everything works but the tips alert. I've reimported and verified that it works on streamlabs but doesn't work on streamelements. any suggestions?
Which alert package did you get?
the Uplink one from NerdsorDie
@viral patrol Can you help the guy out ⤴
Can you poke me in 2 hrs? once I get to PC I will check it out
OK. Dmed @graceful wharf -
I think that if other types of alerts are working, this could be a simple issue 😉
Hey. Quick question. Can I create fully custom website hosted for example on github in which i insert data from StreamElements to create overlay?
Its not advisable to have w/e you want to process hosted on Github as you will have to have it publicly open.
Github was an example. I mean - can i create website which will be injected with data from stream elements - for example new follower apeared
Well it would be better to process new follower/sub/tip data directly from Twitch's API if you ask me.
I don't see the alerts open via our API
Possible, yes. our very website is built on our API. Best practice is what Keizar said though
hey is there a way to get the name of the streamer's loyalty points from the api?
ah ok perfect thanks @low sierra, i was looking at the points category oops
hey I'm using a custom event list to cycle through recent subs, follows, etc
and I got my first tip yesterday and ever since then when it shows the last person to host me, and how many viewers they hosted me with, instead of the number it shows the last person to tip
the code reads as
*let userCurrency;
var arr=['','','','',''];
var counter=0;
var len = arr.length;
window.addEventListener('onEventReceived', function(obj) {
const listener = obj.detail.listener;
const data = obj.detail.event;
if (listener === 'follower-latest') {
arr[0]='Follower: '+data["name"];
} else if (listener === 'subscriber-latest') {
arr[1]='Subscriber: '+data["name"];
} else if (listener === 'host-latest') {
arr[4]='Host: '+data["name"]+'('+data["amount"]+')';
} else if (listener === 'cheer-latest') {
arr[2]='Cheer: '+data["name"]+'('+data["amount"]+')';
} else if (listener === 'tip-latest') {
arr[3]='Donation: '+data["name"]+' $'+data["amount"];
}
});
window.addEventListener('onWidgetLoad', function(obj) {
var data=obj["detail"]["session"]["data"];
arr[0]='Follower: '+data["follower-latest"]["name"];
arr[1]='Subscriber: '+data["subscriber-latest"]["name"];
arr[2]='Cheer: '+data["cheer-latest"]["name"]+'('+data["cheer-latest"]["amount"]+')';
arr[3]='Donation: '+data["tip-latest"]["name"]+' $'+data["tip-latest"]["amount"];
arr[4]='Host: '+data["host-latest"]["name"]+'('+data["tip-latest"]["name"]+')';
});
var i = 0, // Start Index
$el = $('#action-rotate'),
$temp = $('<span />');
$temp.hide().appendTo( $el.parent() ); // Setup Helper
(function loop() {
var w = $temp.text( arr[i%=len] ).width(); // set text + get width
$el.fadeTo(600,0).animate({width: w}, 300, function(){
$el.text( arr[i++] ).fadeTo(600, 1);
});
setTimeout(loop, 3000);
}());*
and it looks like this
I'm pretty new to coding and I didn't actually write it, @viral patrol did for me
Hi, just fix one part of it:
window.addEventListener('onWidgetLoad', function(obj) {
var data=obj["detail"]["session"]["data"];
arr[0]='Follower: '+data["follower-latest"]["name"];
arr[1]='Subscriber: '+data["subscriber-latest"]["name"];
arr[2]='Cheer: '+data["cheer-latest"]["name"]+'('+data["cheer-latest"]["amount"]+')';
arr[3]='Donation: '+data["tip-latest"]["name"]+' $'+data["tip-latest"]["amount"];
arr[4]='Host: '+data["host-latest"]["name"]+'('+data["host-latest"]["name"]+')';
});
Then it should work properly
@rugged spindle ⤴
@viral patrol so I copied that over and now it's doing this http://prntscr.com/l5rgzx
arr[4]='Host: '+data["host-latest"]["name"]+'('+data["host-latest"]["amount"]+')';
thank you @floral fable
I am so blind.... This is why one should not code if you can't check it
Hey, is there someone who could help me ?
@chilly parcel post the question
I'm trying to count all donations from my channel but problem is that in my channel are no donations. Is it somehow possible to add fake data ?
Hello is it possible to pull all followers from JS (obj,detail) I only get those they are in recent. I am editing Credit Roll for your Stream End scene widget.
recent data unfortunately is only capped at the last 25 of each event.
so we can't get a full list or X amount past 25 recent followers for your channel. This is to prevent something internally for our system, most likely to not use a lot of data storage, even if temporary
@chilly parcel of course it is possible, you can do it there: https://streamelements.com/dashboard/tipping/list
There's a button "Add a tip", this one will add a tip to your list
Can a guru help me ? Just recently swapped over from Streamlabs , but i used the glitch package , and ive tried copying over the stuff from the jsfiddle but the sounds just arent working . As you guys have a cloud i really want to make this work .
Of course. What part of Glitch are you looking for?
Alerts?
Oh. if sounds it seems like alerts
Just download mp3 file and set it up as alert sound
thats the problem i cant find them, gone through all the files i have , i think the actual sound is connected to the animated image . im so confused . all this code is new to me haha ^^
Can you paste me, what you have on DM?
Hey, i'm having trouble with the api can someone help me ?
I'm trying to create a tip by a post request on https://api.streamelements.com/kappa/v2/tips/
I give every required fields, the authorization bearer and the channel after tips but the api returns me an error:
{"statusCode":400,"error":"Bad Request","message":"child "amount" fails because ["amount" is required]","details":[{"path":["amount"],"message":""amount" is required"}]}
But amount is given in my post data and is not null
Have you double checked the payload schema to make sure you are sending the request in the correct format?
yes i'm sending it in postfields
Ok i'll try to find out ty
I resolved my problem ty, the solution was to json_encode and specify json type in headers
hey @floral fable I replaced the code with what you gave me and it makes everything go blank.. I'm headed to sleep right now but I'd really like to figure it out tomorrow! thanks in advance
I'll pm you the JS section again if you want to take another look
I'd suggest to use tripe ` to style the code snipper you want to quote.
there we go, fixed the style
Not sure if this is the right channel for this question but i was wanting to know if its possible to export loyalty data for my viewers from streamelements?
We don't have a tool to export it our selves, but you can try and do something with our API https://dev.streamelements.com/#points__channel__put
hey all , is there a way to plug the donation in a html / PHP webpage? (donations, donation goal ect..ect..)
You can get all data from tipping endpoint, so you can set up your own donation goal (for example on your website)
could someone make this for me (I just need the text in a custom event)
If someone could do this for me ill send $10 paypal 
http://chrisis.live/s/1537777623_8.png
I'm after 2 "Custom Events" one for subscribers and one for Tip's with the layout
(Username) * (amount) < Tip
and
(Username) * (count) < Subscribers
The * Will be a bullet point that id like the ability to change the color of, So they MATCH the icon iv got before them like this.
Is it possible to authenticate for websockets? I see the docs around websockets but nothing on how to authenticate and get a token.
Never mind
I need early access code please
I really want to try stream elements in mobile please
Helped in #general-chat ⤴
@pulsar willow The app is currently in closed beta, and is expected to be available to the public by mid October.
If you'd like to assist with beta testing, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
Oh thank you @floral fable
Also, this channel is for support for developers, that use the API and develop custom widgets and alerts
İ know but since i couldnt see anyone other channels i try to look here
But thank you so much for caring me
Have a nice day @floral fable
There are always people watching all the channels

@floral fable good to know hehe

Hi I'm noticing that I don't get events like host or follow when connecting to the websocket. Would anyone know why that may be happening?
I do see events for cheer and tip though
Is it because those events aren't supported via websockets right now?
Won't it be better to subscribe to the Twitch API's webhook for hosts/raids and follower?
Just tossing it as an idea, because I'm not familiar with webhooks and webhooks towards our API.
I'd like to use one consistent place for that and being that I can't capture tips via the Twitch API I've chosen to go with this
Twitch doesn't handle tips anyway and they don't track them anyway, so I understand. Well I'd suggest to wait an answer from someone who knows the answer to your above question. I know there will be a person who will pop in 😉
ok sounds good. thanks for your responses @indigo flume
Anyone know about my question around events in websockets?
@indigo flume do you happen to know someone that's familiar with the websockets side of things?
I'm gonna be talking about this stuff/showing it off in my session/panel at TwitchCon and could really use some support to iron things out
Ok cool thanks 😃
Oh I see or maybe @gusty turret ?
Styler is the one who has written the API so far and has documented it, so 🤔
Perry is not a dev, he is just the boss man
ah ok gotcha
Hey @static wigeon thanks for getting back to me
I'm noticing that via websockets I'm not seeing events like follow or subscribe being captured. However I am seeing events like tip and cheer. Would you happen to know why that may be happening? Do websockets not support those events yet?
Ehm.. the websocket should emit all events you receive
Do you see these events in your activity feed?
yes
I had a breakpoint in my code to capture it being triggered and people in the stream to test it out (such as host). Breakpoint was never hit except for tip or cheer
I'm planning on starting a stream in a minute to continue work on it. Maybe that will help show what's happening?
I mean i can throw a few test events your way to see if it triggers
Is there a way to do that from the emulations?
What event are you listening to?
same as the sample code shown in the websocket docs 'event'
And the event handler code: https://github.com/clarkio/ttv-chat-light/blob/master/src/server/alerts-manager.ts#L55
I see the follow came through but breakpoint was not hit
Am I possibly connecting to the socket incorrectly?
Just seems odd some events are triggered via sockets and others aren't
From what i see here it looks correct.
I'll try to dig a little deeper in around ~10 minutes.
Just wrapping up some stuff
ok thanks
im dev a game
hey there im having a bit of a coding problem for my alert rotator widget if someone could assist lmao
What is the issue you are facing? I assume you are using the rotator widget from #widget-share
yeah so im using the same widget but in two separate sequences. on is the follow/sub/dono/bitt words as purple color and then the other widget acts as the names of the corosponding action +data as another color. For whatever reason my data keeps showing up as NAN for all data in every action i can send a picture if easier
give a jsfiddle link of your code
jsfiddle link?
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
like this?
Mmkei, I'll take a look in a bit.
thanks a lot haha
@languid escarp
This is a reason
this "+" before text, JavaScripts tries to add that to current value, but in that form that suggests it is a number to be added
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
I was gonna say that the original code had integer + there, but then i looked it doesn't directly 
Hi! Can you give me invite code for android application?
Not the right place to ask but here:
@candid crypt The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
LUL i just ran that in #helpdesk-twitch
Thank you
@indigo flume so what should I add to the code? I'm still learning this stuff atm Haha
@languid escarp as LX pointed out you have left out the plus from the original code. Remove the plua thats infront of the data. He also linked you the fixed variant.
okay so now that ive done that. For whatever reason my subbscriber data is all undefined
everything else is good though
Actually. To make my life a bit easier, is there a way to make different parts of the rotator different colors? Like have where it says "Subscriber, follower, bitts, etc." as one color and then the name or "data" as another color all in one code? @indigo flume
ebcasue right now im rocking two separate codes and at radom times they seem to not match or lose timing with eachother randomly mid stream lol
You've deleted something important for the subscriber
ill send the code again
arr[1]= data["subscriber-latest"]["name"] + '('+data["amount"]+')';```
okay so i literally just copy and psated that in there and the name of the sub is up but the amount is still undefined
arr[1]= data["subscriber-latest"]["name"] + '('+data["subscriber-latest"]["amount"]+')';
well i noticed it was missing on the other bit as well
as for each one having different colors, I will need to take a look at it more indepth if it can, but it should be able to
that did it! haha
maybe @viral patrol can pitch in in the mean time as its his widget 😛
okay gotchya. I was just curious to see if that was a possibility rather than using twi codes cuz its kinda rough to make em time correctly lmao
I think I've just discovered that the problem I'm having is that the webm shows only when the muted setting is true, which I think has to do with chrome's newer versions. Boo.
Is that the case? I'm tinkering with the custom CSS on an alertbox, looks like the video only shows if muted is set... without, no video at all. Is there a workaround?
I believe so (to the chrome thing)
I remember seeing other people having the same issue
I'm imagining the workaround would be to set an alert sound to replace the missing audio from the webm? Although they might end up out of sync
Yeah, that seems to work after a fashion.
... until it doesn't. Lol. After a point both the webm and the alert sound play together.
Doubles up
@next heron I think apparently that's only in the overlay editor, but it doesn't apply or affect the OBS browser source, so maybe give that a try
+1 - autoplay unmuted policy doesn't work in OBS, so there is no need to interact document before playing a video, ergo - It will work 😉
hey is it possible to query the streamelements api for the top donators for the last 30 days instead of all? Is there somewhere a code example to this?
Maybe this should help you if you can get all tips for the past 30 days and make you own top list? https://dev.streamelements.com/#tips__channel__get
Jeah i would like to do a small toplist of 5 inside a fade effect let me take a look into
hmm, maybe i should be more in details what i would like to do. That are single donation but i would like to have the top in month per user (5 user)
With that api i would need to parse it inside a database and try to re- calculate the 5 in months with the amount they spend
so a i need a montly leaderboard
By the response example here: https://dev.streamelements.com/#tips__channel__leaderboard_get I'm not sure if this will help you then.
i guess not because there is no limit parameter or parameter monthly i guess i can't see something in the documentation
@static wigeon Can you help with this one?
@quaint swan Well i redirect this to you as dev :x
tips__channel__leaderboard_get won´t be a solution as it ends in {"statusCode":403,"error":"Forbidden"} ^^

I poked our main big boi dev who was written the API, so he will be able to help you solve your query

I think the one way of making it is to iterate over return from /tips as /tips/leaderboard seems to be abandoned
any options on /tips/top to limit the results just as /tips/{channel} has the option?
i want to add the C and sunrise and sunset to widget and it just wont go
it is currently in F i want bpth to be fair to those that us C
i been at this 7 am now almost 9 pm
why cant i write this weather widget thingy ?
no i am trying to write my own HTML , CSS, JS code for it
@burnt shell there is a way, sec.
GET /activities/<channelId>/top?type=tip&period=months
you can also add &limit=5 to get the top 5
Well try it, sounds good so far
@vapid merlin Thanks we try it
I don't know if this is the right group. I tried to add a command with regex but it doesn't work. On the RegExr website it works perfectly but on others it doesn't. Here the link: http://regexr.com/41k9m
^(?=.*(Hi|What's Up))(?=.*Lauren).*$
I don't understand why the command doesn't work. Can anyone tell me what the problem is?
The one you pasted can cause several issues.
I would do something like: ^((Hi|What's Up) (Lauren)|(Lauren) (Hi|What's Up))
@brisk stream ⤴
@viral patrol I tried that example at the time, but only 100 characters can be used and it limits me a lot if I have to duplicate the words twice.
That's why in my example, it only comes out once. I can use more words in any order.
I'll try
Oh, Start of line could stay, so ^(?=.*(Hi|What's Up))(?=.*Lauren).*
It doesn't work either way.
I don't understand.
I think I'll have to do it in two commands. But I don't like the idea.
Huh. I see that lookahead is a problem, I tried (?=.*Hi).* and it didn't work as well
And it doesn't work with Streamelements regex, but it does work with others. It's something I don't understand.
We use golang re2 which does not support lookahead
I recommend using regex101 and select golang on the left
hey, in the twitch marathon extension am i working with seconds or minutes? it says seconds, but at donos it states it's minutes so i'm confused
also any way to make the timer look like this?
@scarlet bluff There is an updated version: https://strms.net/stream_marathon-by_lx
@viral patrol in what way is this updated?
There is no white bar and it is updated to latest jQuery countdown plugin
@viral patrol am i working with seconds or minutes? i'm kind of confused because it's called folllowerseconds and such, but at dono it states its minutes
Huh. I am pretty sure it is seconds added after each event
You can test your setup with test events under bell button on bottom left corner of editor
Nice Avatar @scarlet bluff
Hey, is it possible to set in the live events, that only hosts from 1 viewer will be displayed?
Of course you can add a condition checking a hoster name before pushing it through
Where can I find it?
Huh. I am on my phone now. I gonna be near computer in 9 hrs (almost asleep). Can it wait until then or are you in a rush with that? In that case I could get off bed and switch my computer on.
No, i can wait
Ok. If you can, please poke me some time later so I have a notification waiting.
okay
Ty @vapid merlin
🚬
@ripe ember if you are talking about custom event list: http://jsfiddle.net/cuxg98n6/3/
Just change both occurrences of if (includeHosts && minHost<=event.amount){ (lines 37 and 82) to:
if (includeHosts && minHost<=event.amount && event.name==="UserName"){
Where UserName is a person you want to include
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@viral patrol thanks, but psykonator meant that he wants to filter out hosts below 1 viewer im the custom event list.
Oh, so this solution without any changes can make it happen
I was sure he wants to show hosts from 1 person only
So @ripe ember you can create "custom widget" and copy code from link provided above, where you can modify parameters
Thank you lx! 
Hello :) is it possible to get an early acces key for the app ?
@olive pollen The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
is a streaming API for events planned, much like streamlabs has one? 🤔 would make integrating with my software a lot easier and save me the polling for new donations...
@tepid zodiac https://dev.streamelements.com/ is this what you need? I'm not sure what you mean by "streaming api"
that API requires me to poll for new events over and over again
and keep track of which elements i already dealt with locally
what I'm talking about is a websocket I can connect to that streams events to my software as they happen
which saves me the polling and the local state
and has the benefit of my software not being delayed compared to the actual on stream notifications provided by streamelements
I think you can use webhooks on our API
webhooks require me to run at least a minimal server in my software, which is what i want to avoid
the software runs locally on the PC of the streamer
but if webhooks already exist, it should be trivial to also provide websockets 🤔
I think that @static wigeon will be able to help you on this, for websockets if possible.
His the person who wrote the API, so I'd suggest to wait on his reply. Hopefully he is still around before going to TwitchCon 
i'm in no rush either way 
but as more and more people switch over to streamelements from streamlabs, it becomes more important for me to also integrate with you guys 😉
If he doesn't reply soon, then hopefully someone more knowledgeable can answer you or after TwitchCon poke me again to poke him again.
Sure, trying to help to my best of knowledge here - simple web dev things are my thing.
@tepid zodiac This may be of use to you https://developers.streamelements.com/websockets
ooooh, indeed
thank you!
No worries 😄
what endpoint would i use to get the needed JWT?
can't find it in the documentation
You can find your JWT token on your account channels page: https://streamelements.com/dashboard/account/channels
(Don't forget to click on "Show Secrets")
is there no other way to get it? through an oauth2 login or similar?
seems inconvenient to have to send my users to a website so they can copy/paste that token into my app 🤔
plus it's always a trust issue to have to instruct them to paste some token clearly marked as a "secret" into an external app
Well, that token pretty much grants complete control over the account and information. It's a security thing.
No other way to get it.
but you see how "please paste the token that's clearly marked as SECRET and gives me full control of your whole account" could be a trust issue?
Oauth2 implementation is a work in progress I believe. No ETA on it.
It is a work in progress
are we talking about 1, 3, 6 or 12 months, tentatively?
just to have a general ballpark
As was mentioned, there's no ETA.
alright
@tepid zodiac you can also use the api key, which has only read access to specific events stuff on the account, not complete control
change the method to apikey
Hey guys, I'm looking to develop a website that is connected with the loyalty point system, but I need some help with the process. Is there someone available and interested to help?
trying to help a friend develop a quick and dirty custom integration. in the developer api the path required a channel id -- 24 character hex string... Where do I get the channel ID from?
@fleet sky i believe its here https://streamelements.com/dashboard/account/channels , called account id
Thank you. I'll have channel owner get that for me.
Also if you want universal method, just call /channels/me with your JWT token and you will receive that on return
Thanks, still need the channel owner for that (when they wake up). Started this assuming that read-only operations for basic info might not require authentication.
So for getting just channel ID you can go to https://api.streamelements.com/kappa/v2/channels/[CHANNEL_NAME]
If somebody is interested - there is discussion ongoing on https://www.twitch.tv/twitchdev about extensions
WONDERFUL. Thank you so much! That works! Now I just need to get the jwT Token (which acts like a piN Number at an atM Machine 😁 ). I can keep working with the example payload for now.
appreciate it greatly
Well it's a really simple project (when someone redeems a store item go to discord and issue a command) so was likely just gonna be lazy and make a cron job to periodically poll with a python script. If I felt more ambitious or I get more time I'll integrate it straight into the bot using node
First thing I went looking for was to see if there was already streamelements->discord integration of any sort.
Oh. I know those simple projects. 2k lines of code after "I should refactor it"
lol
I'm lazy when it comes to charity projects. i might even do it in bash if I can figure out a sane and easy way to make sure I only credit each redemption once.
but createdAt is a string rather than a timestamp which will make bash comparisons for tracking latest redemption a pain.
Python it is.
bash: date --date='date string' +"%s"
for example date --date='2018-10-25 11:22:33' +"%s"
😄
Thank you. Now I can just track last redemption. i guess only concern is multiple entries at the same time ... but the stream is small so doubt it'll be an issue. Or could i use _id? Is that hex value guaranteed to always increment or just guaranteed to be unique?
_id is unique, so no worries they are repeated
i figured that. Just being lazy again and hoping it was also guaranteed to increment so I would just have to track the one value rather than all redemptions i've processed.
Just nitpicking now though. Should not be an issue tracking even if there were thousands of redemptions.
Thank you for the assistance.
You can store latest timestamp then iterate over newer
I think that could do the trick
Got JWT token from stream owner. but it doesn't seem like /store/redemptions is returning all redemptions. I'm only getting 9 right now and it's all for the same item.
ooooooh. NM. had to set pending=true to find the rest
Shoutout to the SE folks at Twitch Dev Day today
Hi! I love stream elements and I thought maybe yall would have an app for it. You guys do and I was so excited.. until I found out I needed an access code. I was wondering if anyone could give me a code possibly. I'd definitely test out to good use and let yall know what I think nd what I think the pros/cons are. If not it's ok. I still love your site! awesome!
@agile solstice The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
I filled 1 out
I need a invite code
@tepid summit The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
Hi guys, i'm having an issue with the api, can someone help me pls ?
I'm trying to create a tip on my own channel, i'm giving the right id into the url: https://api.streamelements.com/kappa/v2/tips/MYID
And i'm giving the good arguments like the amount, currency in json format by POST ... And my JWT Token is in the header and is working but i'm having the following error message :
{"statusCode":403,"error":"Forbidden","message":"No channel authorization found"}
It should look like
{"currency":"USD","payFees":true,"user":{"username":"lx","email":"test@example.com"},"amount":11,"message":"123123 123 123 123 12","imported":true}
And if your JWT token is correct it should work
Is it possible to make an overlay like this for the betting system?
is there a list of (and example responses) for events you get with a websocket connection? looking for donations specifically nam
@limpid raft could leverage the contests endpoint maybe? https://dev.streamelements.com/#contests
@wise idol I think you can POST yourself a tip and then log the response? Or you could listen on event:test and send a test tip from the overlay editor, but I think the structures are slightly different
There's also a list in pinned messages, it's for the custom widget but the event names are the same I believe (without -latest)
Hey everyone, new here.
I am tinkering around with custom CSS/JS and just getting the hang of things. Right now I am editing the default code and trying to make a widget that would just handle new followers only. One part I'm stuck at or confused with is audio playing. Is there a special way I need to implement audio or should I just be doing that straight through JS? As far as getting a reference to audio, at some point I would have to feed in the location of the source file. Is there a general web host or way I should go about hosting my audio source files somewhere for streamelements to then pull in? Do they just need to go on a publicly accessible host or is there a way to upload my sounds to streamelements and then tell the code to pull those source files? https://jsfiddle.net/1m2jaknx/2/
Thanks
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
So I'm reading the custom code manual, but I have a feeling I can get a more straightforward answer by asking since this seems like a common issue: Is there a way to display an alert from something other than SE inside the SE Overlay as a custom CSS widget? I am getting a 'no cookies' when using iframe.
@crude swan you can upload audio to Stream elements and then play it. It should appear in "Network" tab of "Developer tools" of your browser (to make it easier to find, filter out media files)
Then just add url of that
And the code... let me check
@crude swan you can try this code, this will explain you a lot about it https://github.com/StreamElements/widgets/tree/master/SubTrainSounds
Also - remember that sound won't be able to be played within Overlay Editor (no autoplay policy and custom CSS widgets are nested)
@ocean narwhal if you create your own listener then yes, but AFAIK you wont be able to use <iframe> within "custom widget"
I've gotten it to show up with allow-same-origin but allow-scripts kills it again, so I'm trying a lot of random stuff so I can use outside sources.
You can use XHR calls to something outside to be invoker of your custom widget alert
awesome thanks @viral patrol !
I can always just run a separate source but I prefer to have it combined since I have other streamers, so I appreciate the direction @viral patrol
@crude swan however sounds in custom widgets will work in OBS as this policy is disabled there
That just means I need to test with my OBS open to hear any sounds when testing? Not a problem at all.
Thanks a bunch. Having that example code is all I needed.
Good luck mate!
@viral patrol Thanks again. Just got audio working triggered on a css animation end.
can any of the devs give hmu with a document detailing the random number algorithm used for stuff like giveaways or other rng uses please?
FWIW last night I tried to use the api to create a new command and kept getting
{"statusCode":400,"error":"Bad Request","message":"child \"command\" fails because [\"command\" is required]. child \"reply\" fails because [\"reply\" is required]","details":[{"path":["command"],"message":"\"command\" is required"},{"path":["reply"],"message":"\"reply\" is required"}]}
Even when I tried using the example payload from the documentation.
I gave up and had to create a placeholder command via the chat bot's !command add functionality and then edit it.
☝ the endpoint that wasn't working
@fleet sky if you want to know, how should call look like, go to dashboard, commands, add a command while inspecting "network" tab in developer tools. You will see two requests made (OPTIONS then POST/PUT). Click RMB on that request then Copy => Copy as CURL
Then paste it to editor of your choice
So you can know how should that request look like
This error is because your JSON payload is wrong.
I'll do that.
Did want to point out then that the example payload is also wrong 😄
No. It is OK.
But it seems like you sent it as form_data element called "command"
It should be JSON object as payload
Just checked and created a command with that:
{
"accessLevel": "250",
"type": "say",
"aliases": [],
"keywords": [],
"regex": "",
"reply": "this is a test",
"enabledOnline": true,
"enabledOffline": true,
"hidden": false,
"cooldown": {
"user": 15,
"global": 5
},
"command": "testing"
}
hmmm. odd. I'll try it again tonight. Thank you for that.
I have one other question -- is there a way to call a custom api (${customapi.http:// ... }) when a redemption is made from the store using points? Will using the custom api syntax in the description work? (hesitant to try it)
Hey guys - So Nightbot has a command for steam - basically, it grabs the current status of a steam profile, the game it's in, and the server IP (if applicable)
Would anyone know how to do something like that for the SE bot?
Hi, Does Anyone know of a custom api link that basically can count down from 10 - 1 for chat commands??
@lyric dune Hi. It is possible using external service like https://lab.xpaw.me/steam_api_documentation.html
@viral patrol Alrighty that definitely looks.. right. I should note that I have absolutely zero experience wiiiiiiiith any of this. Moving from Nightbot, just looking for a way to get the same effect.
Ohhh. So if you are not into programming, this will not be an easy-go
@tardy dirge can you explain it a bit?
Is there a good way to test an event listener via the SE webhook?
I need early access code for Streamelements mobile app
@dapper wren The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
@viral patrol i emailed a staff at @zenith folio and asked them iif they knew how to make a count down command for my twitch chat. so basically streamelemnts will count from 10-1 in a different message. He said to go into this discord and message this section
Hey hey hey. I asked a bit ago about some advanced questions about the rotator widget that got referred to @viral patrol wasnt sure if you had seen them or of you maybe help me out now?
My little tweaks. With comments 🙃
Hello guys! Those timezones are crazy! They made your day when I am asleep 😉
@tardy dirge I am afraid it is not possible to create a command that has more than one response (as countdown should have few of them).
@languid escarp post your question and tag me. Once you are around, and I will do my best to answer it ASAP.
@viral patrol so basically what im looking to do is to make rotator widget have different color schemes between the action that is happening and the person doing the action. I was told it may have to be a real complex code and was curious if you could assist me through it?
On my way
@languid escarp http://jsfiddle.net/lexiu/nfqw0jgb/ - this one will allow you to change color for each part of text
Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor.
@wide wing do you mean testing the SE websocket? If you additionally listen to event:test you can send test events from the overlay editor or replay from dashboard, but the payload structures are slightly different, so you probably need to do some additional logging. After that you could just emit your own event 🙂
DUDE @viral patrol THANK YOU it worked
hello, i got this error "Cannot PUT /kappa/v2/points". when using this url "https://api.streamelements.com/kappa/v2/points". Is there a solution?
Bonjour! I'm working with @oak spoke on the same project. I found out that "https://api.streamelements.com/kappa/v2" is indeed the base uri (which isn't really clear from the docs), but we're still running into the error where we cannot make a PUT request, and I'm running into this error on a get request:
{
"statusCode": 403,
"error": "Forbidden",
"message": "No channel authorization found"
}
Ah, it's clear to me now that you use different channel id's than twitch's api. However, we're still running into the issue where we're unable to PUT, in our case to the /points endpoint
So the solution was, to not use url variables (?channel=...), but instead just make the url like this: /points/<channel>/<user>/<amount>
There are three items:
- endpoint URL (containing variables for simple request as just number)
- Authentication Bearer token header
- payload as JSON object if request is more complex
However there might be some other stuff because API is always in development, there are two docs as this channel subject
One is more complete but might be a bit outdated
Also @spare yarrow you can GET /me endpoint to get channelid
I honestly didnt know where to ask this but where can I get a code for the stream elements app?
@jade quarry The StreamElements Mobile IRL streaming app is currently in closed beta.
If you'd like to assist with testing when public beta testing becomes available, please fill out this form: https://goo.gl/forms/3DaiLckKDjeMAeVt2
This wouldn't be the place. More of a #general-chat question.
Thank you
@mild cipher awesome thanks for the event:test pointer that'll really help 😃
Hi alll!
is it possible to off responce from bot when somebody redeemed item from the store?
@native swallow This would not be the correct spot but yes. You can go to the Chat Alert Module
Go to Redemptions & Disable the blue tick.
@vapid iron hm, bot still give me answer
Sorry. Did you click 'Save' after disabling the Redemption module?
yep. answer looks like "you, Casperovskii, succesfully redeemed ..."
So I was told to come to this channel from live chat. I have some custom alerts that need to be edited to suit streamelements system.
Hi 😄 Was wondering if anyone can help me with a css code where the follower alert would start with one letter dropping after another to create a word...
basically for my alerts
@verbal falcon !! For this matter @viral patrol it's your guy
Thank you again! @vapid merlin
Tho it's 6-7am for him right now...
Heyy, so about the marathon extension, I want a dollar to add 12 minutes, but I'm kind of confused. It says "3 will add 3 minutes" so I tried setting it accordingly, and upon a 10 dollar dono it didn't go up 2 hours. Is it a typo and am I supposed to count it seconds like this?
Most likely there is aditional multiplication in the JS code when you receive a tip
I have a more modified version of the marathon widget, so will see the original in a second
so if you receive a 10$ tip, the 60 seconds placed there will be multiplied by 10 making it 600 seconds
Which is 10 minutes
I have some custom alerts that need to be edited to suit streamelements system. @gritty stump
@indigo flume oh cool, so now i have it correctly ty
Sorry meant to tag @viral patrol

:(
{
"statusCode": 500,
"error": "Internal Server Error",
"message": "An internal server error occurred"
}
What endpoint triggered that?
And was it request with parameters in endpoint or with JSON payload?
This is to fetch https://streamelements.com/overmasterfr/leaderboard right?
I also get statusCode 500 on https://api.streamelements.com/kappa/v2/store/{channel}/items
@viral patrol
Give me a second
@fresh niche first you should request: https://api.streamelements.com/kappa/v2/channels/bitsnoxx to get your channelId
Then go to URL of your endpoint using _id from /channels/bitsnoxx endpoint
Aaah, thanks ❤ I was confused since you can use channel as parameter on some requests
@viral patrol
AFAIK the only endpoints using channel name are channels and chatstats
Have fun with our API @fresh niche
Thanks 
Hi all. Is there anyway of adding an elimination counter to an overlay that I could update manually with the push of a hotkey?
With a hotkey - unfortunately it is not possible, but it is possible to do a twitch chat command to do that.
.awsome-text-container { font-size: 25px; font-weight: bold; position: absolute; top: 75px; left: 300px; }
@viral patrol
So i put in the position and top/left
so i now got the text in the box part of my gif
Huh. You know you can achieve this without custom CSS?
yeah i seen what you put in helpdesk 😆
(if there is no logic or custom JS there)
did this before you put the suggestion
.awsome-text-container {
background-image: url('{{image}}');
background-repeat: no-repeat;
background-size: auto;
font-size: 25px;
font-weight: bold;
position: absolute;
top: 75px;
left: 300px;
}
You can get this like that
oh okay
Or:
.awsome-text-container {
z-index:2;
font-size: 25px;
font-weight: bold;
position: absolute;
top: 75px;
left: 300px;
}
.awsome-image-container {
z-index:-5;
position: absolute;
top: 75px;
left: 300px;
}
why two instances of awsome-text-container?
Oh. Fixed
@viral patrol so there is a way of doing it? Without the hot key how would I do it with a twitch chat commend? Sorry I’m new at this?
does anyone have a command for changing game and title like nightbot does?
It's a default command.
is it actually
Yes.
What is it?
Should be !settitle and !setgame
I'm an idiot, ty for being a genius
One last question, do you know of a "define" command, so basically a dictionary command
@mellow sparrow example of something like that can be found there: https://github.com/StreamElements/widgets/tree/master/OverlayCounters
hey guys, any links on how to use the webhooks? the new docs are empty
Webhooks or websockets 🤔
Hi guys, there is a way to integrate the points system to my own website. Ejem: i wanted to create a site (maybe an idea for you) to sell chest but without real money like streamloots? i have this idea because in America latina some people dont have a cc so i really would like to sell it with the stream points. I tried to implement it like pearks 😄 but the user should be able to collect the cards and have in their accounts, something like collectionables cards. Attached my sample card, it's a spell card, when a viewer redeem this card i have to play a horror game on stream.
@《Rey Val3》 yo hablo español
hi there! is there a way to get the count of a command similar to ${getcount} through bot commands? not seeing the value returned in /bot/commands/{channel}/{commandId}
@hollow compass of course you should be able to do that with our API. To give you directions you need to:
- Create twitch API authorization (so you can identify users)
- Create connection over API and your personal JWT token to our endpoint to get amount (value of wallet) of users - those endpoints you would like to use are:
/points- to get amount of points of user/store/{channel}/items- to get available items with preview image, id, URL and so on./store/{channel}/redemptions/{itemId}- to redeem an item
Then you should save those data on your website (as a 'transaction history' or card collection
@teal drum Unfortunately there is no access to counters via API ATM.
oh that's a bummer, thank you @viral patrol
@teal drum however you can store counter out of StreamElements and then access it. For more advanced usage you can create your own function to return value and be accessible from wherever you want
Bot counters are as simple as they could be, so people with no tech knowledge can use them out of the box.
@viral patrol thnak you for this info. GG!!
i looked at the overlay counter linked above, think i'll do something similar to keep the count with an external service and call the api through the bot. thanks!
Would it be possible for me to get the script for the sraffle and raffle command?
@last thunder

Not sure what you mean looking for a script, there are defualt commands for that @valid grove
I wonder if it is because of EU directive to provide RNG algorithm for every 'lottery' software.
Is there a way to pull cheer data for commands?
Such as having someone see the top cheerer through chat?
@pure trellis Hey. About the code - there is a pinned message here that has all available variables for custom widgets.
So what you asked if its wrong, is actually correct.
thats good. Without diving into all this, I figured that would be the first to check on. I may just wait to see if Grot responds. It's not that big of a deal, other than every stream, the credits keep getting longer and longer XD
@indigo flume thanks for checking on that for me!
I've already DMed Grot about it and he responded, that he will take a look at it. But here is how on one of my widgets(and most of the custom ones) start with in the JS:
@pure trellis Hey, as far as i can tell from briefly plowing through the widgets code - everything looks fine. I can check out what makes it go crazy on your end if you share an editor link with me in a DM (dont paste it here, unless you feel very adventurous
)
@indigo flume @pure trellis it only happens on donations tho, right ?
cheers
@pure trellis Figured it out - its not an issue with the widget, its a bug in the platform - reported it and the SE devs are working on it
hello!
i’m currently using streamlabs one and want to use an api but its very hard and not much documentation is it possible to use the streamelements api to get a recent follower so i can use css html and java script to create animated stream labels
Hello. You can do that within our editor without any issues
Of example:
let lastFollow;
window.addEventListener('onWidgetLoad', function (obj) {
let data=obj["detail"]["session"]["data"];
lastFollow=data["follower-latest"]["name"];
$("#follower").html(lastFollow);
});
window.addEventListener('onEventReceived', function (obj) {
const listener = obj.detail.listener;
const data = obj["detail"]["event"];
if (listener==='follower-latest' && lastFollow!==data['name']){
lastFollow=data['name'];
$("#follower").html(lastFollow);
}
});
Sorry about terrible indents - Wrote it on discord directly
@ebon needle ⤴
@viral patrol So I need some assistance. I was directed to ask you. I am using that credit roll, the simple one, at the end of my streams, and for a while it worked great, Reset its info every stream and whatnot. Well now... The Subscribers resets each stream, and the followers, resets, but the donations and cheers do not. How do I fix this? (I had a huge donation like 3 weeks ago still showing up, and since i read through the credits starting with "our ___ from tonight were", it gets awkward when things are showing up from weeks ago. Thanks!
@serene osprey Hello. Our team is working on that (I even think that they might finished they works and it is waiting for review/publish)
So It should by fixed by itself pretty soon.
"Fixed by itself"... I hate when somebody calls my work like that, so sorry devguys. You know I didn't mean that 😉
@hushed hazel ILY dude! Thank you so much for looking into it! ❤ ❤
Wait! I found the cheer list in StreamElements - and I know Chatbot can display cheer totals in chat - so it seems possible for StreamElements bot to pull that API? Since it has the numbers somewhere...
Not sure how it all works..
@viral patrol great. Thank you so much! How do implement this code into the stream overlay?
Anyone wanna make me some css animation?
Hi, I am currently using the 'Credit Rolls for you Stream Ending' that is in #widget-share made by Grot, recently it has been showing the bits on the end scene from previous streams even though I do not want it to. Previously it has not done this and every time I have reset my stream it has reset the credit rolls and only displayed information relevant to that stream. I have not changed any code or touched it in any way but it just randomly kept all the bits from old streams on it, it resets follows, subs and donations just not bits. I even tried deleting the one I used and re-adding a new one to my overlays and used that one instead though it still does the same thing. If anyone knows how to fix this it would be great, if you need anything from the code or whatnot I can show it.
I noticed the chat module of OBS.live is very slow in comparison to the raw Twitch chat popout. It seems to refresh in intervals that are obviously slower than they should be. I had people in chat redeeming things within my SE store and hearing the notification before I could see the redeem command in chat.
This is being addressed and fixed!! (:
Hello there, for the past few days I haven't been able to use <iframe> in my custom widgets, was it removed?
@ember swan I think sameorigin flag was always in Custom Widget, so you won't be able to put external stuff inside. However if you want to display something from external resources I recommend getting it via XHR JS call. With XHR there will be header of sameorigin checked (to see if external resource allows you to include it somewhere else, which couldn't be checked with iframe).
Well, I'm using the Custom Widget inside the overlay section of the Dashboard
and I have no idea how I would do that 😄
So, what are you trying to achieve?
I had an overlay set up so that I had a Custom Widget with an <iframe> pointing to a page on my site that I could use as a background and on top of that I had a timer and other things
But now the background doesn't load anymore because the <iframe> tag doesn't work (or is being restricted)
If this site is pure HTML/JS/CSS you can copypasta content of it to widget itself
It's not :/
I have news articles on my site that I want to show
And the content on that page is dynamic
This is the page I'm trying to use as a background
Minus the text and image in the middle (that used to be handled by the SE overlay)
Huh. You can add it as browser source without having streamelements in the middle as far as I understand there is no loging with displaying this stuff
is streamelements giveaway bot code open source?
You're pretty persistent about this. There's nothing in the API that allows anyone, even the streamer, to rig the giveaway.
Trying to talk to someone who doesn't blindly assume. that's how you miss exploits
I can read and write code. Bet i find something. Could even be a mistake. maybe his name is picked due to a glitch
Cause as a statistic/computer science person it doesn't add up
Okay, then let's be fair about it. Is it 100% completely statistically impossible for him to have won as many giveaways as he has? Improbable does not count; only completely impossible.
It's been going on for months
The chance of it has to be under 0.00000001% by now
hell the chance in his last 2 wins was 0.0024
in 2 giveaways. I run 4 a week. over 6-8 months. do the math. or point me to someone who i can talk to who will work with me than dismiss me pointlessly
Okay, and what did Hectic say when you were told to DM him?
@dapper quiver Looking at your past giveaways, it doesn't seem like anything is out of the ordinary. Yes there are some reoccurring people, but the number of entrants on these isn't very high.
Also, you have sub luck enabled, and from what i can see, the people i have seen reoccurring are indeed subbed. ei; more chances of winning.
To answer your question, no, our giveaway system is not open source. None of our code is.
If you'd like to DM me and elaborate on what's happening, I'd be more than happy to look into it, but again I examined the results, and nothing seems out of the ordinary.
1 sub of 12 subs with another 12 non-subs
You'll have to be more descriptive here..
Win
Lost
Win
Lost
Lost
Lost
Win
Win
Win: 4
Lost: 4
^ his record in attempted giveaways in last 8
I can keep going back but statistically he is given no bonus over 5 subs I can name in EACH giveaway. YET I can name several subs or people who never won ONCE during this time.
So not only do we need to see the % chance of him winning we need a % chance of someone with the SAME odds to never win
Lost
Lost (but not max enters)
Won
Lost (but not max enters)
Lost (but not max enters)
Lost
Lost
Won
Lost
Lost
Lost
Won (out of 5 with 2 winners 1 being the other person)
Won: 3
Lost: 6
Over the same giveaways entering more than the other person. with 2 of his wins being multi winners or high odds. This person doesn't even come close
Ok first list is the user who wins 50 50
second list is a person also a sub over the same amount of giveaways (25 total)
Give me usernames, please.
From what you've described, this is just probability doing it's thing.
You've DMd me 1 username, when you just talked about 2 different people.
the chance of that being true is lower than a problem with the bot itself 😆
Like i said the chance alone over the last 2 giveaway i calculated to be 0.024% and this is over 100s of giveaways
Actually not at all, we don't look at usernames when picking something randomly.
There is no pattern followed either, the user you dmd me is always in random locations on the Giveaway Entrants list.
So the "probability" of the "bot" having an issue, is not there at all.
Also, I would like to see the math you did to come up with a .024% chance of him winning.
Massive thank you to @viral patrol who got a counter for me! Still learning bits about the code but I got it working! Thanks to stream elements for having an awesome!
If you want more fancy stuff besides those on #widget-share check our github with other examples of what you can make with StreamElements - https://github.com/StreamElements/widgets
@viral patrol 
Hey all, can anyone help me to delete the !donate command that responds with SE tip page? I don't use that as a donation method but it spawns every time the command is triggered
Answered in #general-chat ⤴
I want to edit the !top points command for the leaderboard to show only top 3 vice top 5. Can i make a custom command to show? What should I use?
Unfortunately, the top command can't editied, as it has a default response. Also this is not the right spot to ask about commands 😉
this is for custom code/widget talk or API talk 😉
Thanks for that. Any direction I can go to ask for help ?
#helpdesk-twitch For general SE Tools issues/questions
I am not sure where to ask this. I am looking for a command that will post the latest twitter update automatically on a game in chat I did it with pubg before but I can't remember how I did it I want to do it with a different game so Blank just tweeted a new tweet any help would be great thanks!
I wonder if you are talking about Twitter bot module you can find here https://streamelements.com/dashboard/bot/modules
thank you that is it i could not find it
Ahoy! If I wanted to leverage the SE API to collection information about tips and cheers on a channel, I'd need to use the owner's personal JWT right?
Correct. Non-public information is secured by the JWT token.
Hi guys, there is something wrong with the !raffle? always win the first person that write the Join Command. Can you check this?
I need a dev, please dm me when you get a chance
@broken sky if you have full access privileges on his account you should be able to view this data using your JWT token.
@hushed thicket just state your question here and once somebody is available, you will get your answer
One of my contacts gave me this, looks like they have an integration for our stuff:
https://lumiacove.com/lumiatwitch
Is that something one of us here did or not? 😄
A lot of my streamers have HUE stuff floating around, so would be nice to know
hey is there a way to access the old dev.streamelements.com, the new one doesn't cover a lot of things
The new docs are being written but in the meantime @@static wigeon and @vapid merlin can answer questions you have @gritty aurora

just need to know what status 200 means when requesting the bot/channelid/say endpoint
well it isn't succeeding LUL
Ah
Is there any response?
OK. Gonna check it on my end
@gritty aurora - do you send the message in the body of the request?
yes
Can you show me the payload you send?
one sec
Just checked it as well, seems to respond status 200 without message on channel
@gritty aurora just did a test message on your channel with /say

i feel so stupid LUL
its all good 
yup it works now \o/

And because of that message I tried to check bot, so I implemented methods into my API wrapper... Maybe some day It will be complete 😉
What does it do @viral patrol
This is basically SE API wrapper for PHP so you can just go
$api->BotSay('test message'); and it will push message to channel
Hey, wanna document the API while at it? 
went to shop. ETA of coming back: 2 months

I wonder if my code will be selfdocumented, so I will be able to push it to some phpdoc or something like that then it will produce documentation
Oh you came back from the shop. How about documenting the API?
I thought most of it is already documented
Outdated and old.. slowly updating the new one
But I found one endpoint of /modules route not even mentioned in docs
When I am working with API, I try to do it 'practical' way
So I go to dashboard and then look for a page using it, then copy payload and manipulate it
And to be honest this is the way I would suggest people to go as they can see it in real action
(But I know documentation is important)
Indeed.
what is the value needed for java script to access the last subscriber
is it lastSubscriber
?
'subscriber-latest'
so what do i need to change on this?
Can you paste your piece of code I got you for follower-latest?
Oh, just open it and replace 'follower' with 'subscriber'
Huh. This is not the thing I prepared, but give me a moment
Do you want to have separate widget for that?
OK. So let me guide you
i would like to keep the variable follower the same
to reduce the amount that i need to change
OK, so if it is going to be separate widget I will just tell you, how to change it to display subscriber instead of follower
alright
So... line #94: replace follower with subscriber
Line #108 - replace follower with subscriber
And that should do the trick
Yes
okay thabks!
@viral patrol You mean having the channel owner invite me as a "manager" and using my own token? I've tried that with another test account but all I could get were 403 responses (also sorry I'm late!)
So. I will tell you a trick 😉
But don't tell anybody (besides those guys here)
Go to dashboard and inspect network requests
You will see, that they are using different JWT Token
You might want to try using that
I am not 100% sure if it is still like that, but it was some time ago
Ohhhh wow I didn't even think about that
JWT Token is tied to a channel AFAIK
Are those reliable, or do they expire and rotate frequently? At least this would feel a little bit "nicer" than having to use their personal token
I am not sure but I would bet it can be reset by you or channel owner when 'reset secrets' is clicked
what's up guys? Can someone give me a hand? Will they be able to execute the commands for the parameters of the streamelements?
$addpoints("$userid","0","100","$username meteu o dedo no nariz do piadasemgrraca e tirou $value $currencyname de dentro do nariz!","não encontrou nada so ficou comendo meleka")
I already have some parameters to change but I do not know what is missing for the operation of the command:
${addpoints}("${user.name}","0","100","${user.name} meteu o dedo no nariz do piadasemgrraca e tirou $value ${pointsname} de dentro do nariz!","não encontrou nada so ficou comendo meleka")
Do you want to add points over API or custom command?
You cann add points by !addpoints command only or by API call which would require you to have MITM script
I understand, but I wanted to add points to my views by custom command, I'm migrating from streamlabs chatbot and I was trying to migrate at once and by API I do not know how to create the command, thanks
Oh. There is no such command that adds points and displays message
so i have my donations on streamlabs, so it doesn't add to the marathon timer when somebody donates. i've tried importing with the chrome extension but it doesn't work. any ideas?
If your donations come from SL, there is no way to have it update our widgets, only our events will work with our widgets
@scarlet bluff The import tool helps you switch to streamelements for tipping and alerts. It's not made for importing multiple times. If you need help with this tool to help you switch, let us know.
Idk if this is the right channel for my question, (nothing to do with api) 
I need help with some alert html/CSS code, i have a webm file for animation and i have it on html as this https://i.imgur.com/74dSVIV.png but it still is not playing i just get the first frame as an image whole time.
Oh. This is a good channel to come by
So. This should work, but not in browser. Try to open your overlay in OBS
As Chrome has no autoplay policy of unmuted media which doesn't affect obs
can any one help me
sure, just ask your question
i want to integrate a way to tip into my website through streamelements instead of having to go to my tipping page to do so. I know its possible becuase Ix told me it was he sent me the streamelements dev site but like its blanks on a bunch of sections
@midnight orbit
^ This would be a neat feature btw, but I'm sure it's not possible yet
It is possible and not really hard to achieve if you have working payment gateway. After transaction is finished, just send request:
URL: https://api.streamelements.com/kappa/v2/tips/[ChannelID]
Method: POST
Additional headers:
authorization: Bearer JWT-TOKEN
content-type: application/json; charset=utf-8
Payload:
{
"currency": "USD",
"payFees": true,
"user": {
"username": "username",
"email": "paypal@email.com"
},
"amount": 123,
"message": "This is a test",
"imported": true
}
@ebon needle @gritty aurora ⤴
But as I wrote - you need to have your own payment gateway and StreamElements will be just to display alert on stream, store information in "Revenue History", update top tip/top tipper and so on, but not any part of processing money.
hm couldn't I just do an iframe of the tipping page?
I am not sure if it is safe and 99% sure that paypal won't work in iframe.
This is why:
- create a website
- add iframe with opacity 0 px and above of your website with paypal "send money"
- place a "clickbait" button on your website just in position where paypal send money is
- wait for incoming money and police
This is called Clickjacking
Yeah heard of it ^^
Is there any other way other than manually doing it via API?
Don't really want to make my own payment system lmao
Oh. It might be one
Give me 5 minutes
OK
<a href="https://streamelements.com/d4mm_/tip" onclick="window.open(this.href,'targetWindow',
'toolbar=no,
location=yes,
status=no,
menubar=no,
scrollbars=no,
resizable=yes,
width=480,
height=720');
return false;">Send me a tip</a>
This will allow you to display Stream Elements tip form in small window
ohh shit that's smart
Sorry if this is the wrong place. I was told in helpdesk-twitch that I was to ask this here - I want to make a command that tells the time I am at for when someone types the command !time in chat. I tried the variable ${time.TIMEZONE} and tried both replacing TIMEZONE with Central and CST as well as CENTRALTIMEZONE and still get displayed UTC. What should I put to get the bot to show my time where I am located?
@prisma valley you can give timezones as locations from here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones, so try ${time.US/Central} 😃
Thank you thefryewire. That was what I needed to know 😃
Hi there, im currently having an issue with your api. In your documentation, you state in your activities section that it should return a message in the json, however when I make requests I do not recieve this. Ive tried 2 different methods, the web hook and the api but they both return the same
@pliant osprey Redemption type of activity does not contain a message.
Activity like tip or cheer does contain
So is there no way to collect the message people enter into the redemption?
No, not at the moment. When people redeem items from the store there is no option to leave a message.
You should add it to the idea board - https://strms.net/ideas
@vapid merlin there is an option to leave a message but not recieve it
Ill add it to the ideas board


please do
☝ solved. 
That was quick
Already had a websocket event 
hey
any information how to auth? Api's pages is empty.
@glossy ferry check this post: https://discordapp.com/channels/141203863863558144/259680142459142144/513319135439093770
thanks!
It uses JWT for authorization, that shows an example of how its done
@cinder lintel Where to get more information about it? Structure, requirements?
Depending what you need to achieve. What API point you need?
Well that end point shows what it needs to give you the response you want
https://api.streamelements.com/kappa/v2/points/{channelid}
to do it i should firstly autorize myself
to prevent "No authorization token was found" error
headers = {"Authorization":"Bearer "+jwt_token},
)
print(r.text)```
something like this (example taken by searching for auth in this channel)
you're too using python? Nice)
I work with C# at my work, I've dabbled with python for work purposes and don't like it
thanks for example
@indigo flume are you doing some programagicing at your work? 
@indigo flume SKB Kontour?
+1 for vscode. -1 for c#
oh i miss 😄
wait what
ironpython? 😄
because this?
iot 
Yeah, so back to work refactoring 

@vapid merlin In your school I would get F for using JetBrains + PHP
mac 
uhm
golang sucks in jetbrains
Before I was using Netbeans, Eclipse and now just JetBrains + vim
(oh my vim to be specific)
I know vscode has vim bindings
Used it for a week
Then I got email "Your recurring license on PHPStorm has been extended automatically"
lol
This looks to complicate
there are markdown extensions for vscode as well you know 
Pinned message on that channel has a documentation which was wame using that
You won't convert me to vscode (at least not until September 9th, 2019)!
VSCode's live code sharing is awesome 
I have nobody to share my code with, I don't want anybody get serious diseases from it.
No time for games, custom widgets need to be made
@soft hull this is almost like gaming.
You play with that, there are bosses called "deadlines"
OOOOF
You collect your inventory on github
skill improvements called refactoring
farming git points
Also there are cheats you can find on stackoverflow
Do u get money :333
Money? What is that?
;-;
I've invested a lot of skill points in my cheat called "googling"
Aaah, ingame currency called SLA points
Wow this got silenced real quick
you scare developers with any mention of "weeb"
Da hell are you guys doing in here? 

I dont have ninja frog powers
This is ART: https://3v4l.org/jmrZB
Run your php code online; get statistics, vld output and compare output from all versions.
I do have anime power
Yes, you can laugh now.

Hey, quick question because I know the documentation isnt the best. Do I still have to specify a bearer jwt token in the header for this?
If not, what stops me from just altering my points on another channel?
You need Authentication for that scope
maybe it is skipped in documentation
But it is required
Thanks, how would I go about implementing that, is it the same as all the others where I set it as a header like authentication: Bearer {jwt} ?
@pliant osprey yep
Cheers @vapid merlin
Hey sorry to be a burden. Im trying to use the points api but I keep getting 404 not found.
I am using channel id aswell
Send me in dm the full request
Oh. If you have this open it seems that you try to send GET request and there is no path for that method
For testing purposes I was using that: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo
That seems like a cool tool, ill use that in future 😄
The issue was I was using get and not put. Thanks alot guys
Hey guys! So I just tried out the new Fields feature for the Custom Widget and I'm running into a slight problem. If I change one of the Fields the Widget isn't reloaded and therefor I really only can see the changes I made when I force it to reload by either doing some modification in the Widget Editor or reopening the Overlay. Is there something I'm missing, or am I doing something wrong? I'm currently just fetching the values in the onWidgetLoad event handler!
@cyan fulcrum Thanks! We are already working on a solution to that. The easier way to reinitialize it is to resize it, but soon there will be a fix to that released.
You can either do the BAD way (we support it as well) like:
let variable={{field1}};
let variable2="{{field2}};
or onWidgetLoad, which is the best way to use it 😉
Does anyone know how I can use a custom font for a widget?
I need to set up “recent tip” or “top tip” but it doesn’t have the font I need, and I can’t find how to code for it. Any help please?
You can use any font from here: https://fonts.google.com/
Choose a font, then
Then customize it from this window and use the imports
Thank you!!!
Do you know where I can find what to enter for “recent tip” or “top tip”? I’m not able to edit the ones that are already clickable, I would have to enter new code
Check the pinned messages for the documentation for custom widgets variables
Thanks. If I have any more questions I’ll hop back in. Been searching for hours I should’ve came here first
the doc at https://dev.streamelements.com got replaced with the older one at https://developers.streamelements.com ?
dev.se.com is the older one, while the developers.se.com is the newer one, but not fully documented
yikes ok ty


is there an API to retrieve counter values? I see the points API but nothing for counters
the points API is part of the loyalty points, but afaik, atm we don't have an end point for the counter variable
GET only tohttps://api.streamelements.com/kappa/v2/bot/ACCOUNTID/counters/COUNTID
The nerd devs can help more, i just know the link
I shot the gun too early 
neat, works. Tyvm
Is there a ways to access to the custom counters created by custom chat commands inside the custom widget for the overlays? Or is a XHR the only way to get it in there?
I'll try and see if the XHR works or if it'll just run into CORS
Did not know widgets had chat event access. Thanks for the help
Seems like that won't benefit from the existing per-user cooldown, but that seems easy enough to add by just keeping track of when users last issued a command
with the added benefit of being able to share a cooldown between multiple commands when doing it in the custom widget
@trail mist you can access those counters in a way I am not huge fan of (it requires you to provide JWT Token within widget), the OverlayCounters have their own data storage mechanism, but you might want to look at https://github.com/StreamElements/widgets/tree/master/BotCounter as well
Thanks, I think for the application I was thinking of the non-persisted counters inside the overlay widget are enough.
This isn't an api question so feel free to send me to another channel. I can't seem to find a good fit for where to ask. Trying to figure out how to set a theme thumbnail
Theme thumbnail?
Create an overlay, save it. Go to your overlays screen. Big ass Question mark as the thumbnail.
However when I download themes or superthemes, they have their own thumbnails
Hrm. They seem to have them in the themes gallery
Because those are themes/overlays provided by us
oooOOOO
Makes sense. Thanks again, KeiZar. I think you've been the one to answer every question I've asked in the past few days.
hey is there an endpoint i can use to retrieve the banned users from the loyalty system?
If you send GET request to https://api.streamelements.com/kappa/v2/loyalty/[CHANNELID] you will have "ignored":["userA","userB"] in response
But I am not sure if there's anything like ban
Hey, can anyone tell me how this User endpoint works? Theres no documentation for it https://developers.streamelements.com/endpoints/users
I don't know why I can't enter to https://dev.streamelements.com , It redirects me to https://developers.streamelements.com/ , but if you check an archive version https://web.archive.org/web/20180621161635/http://dev.streamelements.com/robots.txt , you can see the documentation
Whoa. I just noticed the Custom Widget has some fancy new settings for colors and text and such. Is there documentation on how to access these things?
Looks kind of placeholder-y right now so not sure if it's fully baked yet
@reef granite in the custom code area html/css/js, there’s a new tab for custom fields... you’d fill that in to affect your widget. (:
Ahh. Figures all I needed to do was actually go into my code. 😛 Thanks
No problemo
@honest bone Really awesome stuff.. Am I a newb if I can't figure out how to access those values from my html/css/js?
I am a lot worse than you. Trust me.. all I know is that you can create custom fields.. now to translate that to work with HTML/css/js... I have no idea. :p you’ll have to wait til one of the smart people come online
hah. nice to know I have company.
lol. omg. it's as easy as {variableName} in html, css and js. I was trying to just figure it out by looking at it and the first thing I tested worked.
Knew I should have checked that. I'm a fool. Thanks @viral patrol .. Is checkbox your best bet for a bool?
There is no checkbox at this moment
Oh. Does it just not work? Because it shows up if I use it as a type
Oh, maybe it was added recently, I will have to check it
I was using dropbox with yes/no values (as I can't use true/false as key in JSON)
Then I made variable=(fieldData["fieldName"]==="yes")
It could use some better styling (currently it's a giant checkbox under the label text) but it does show up on the side. Haven't tested to see if the code parses the variable correctly
your solution also looks pretty good if it doesn't work thou
Yup. It does seem to work in code too.
as far as I can see almost all html input types work (tried checkboxes, datefields (datetime, date, week, time) ...), some have a bit weird formatting and others are pretty much useless at the moment like button, radio or file.
but most of them seem to actually work as expected
Okay, I have a widget related question, it concerns one of the custom widgets from #widget-share and I was advised to post my question here as well as ping @viral patrol
I'm a css idiot. I'm screwing around with the credit roll widget and I was wondering if there was a way to have my top tipper/top cheerer show up there.
I've figured out how to edit some parts of the widget (like text/speed/color) but that's as far as I've managed to go.
Any help is appreciated!
Which widget are you using?
Does something like this still exist in the new API
If I try to use that it gives me a 404 error
Just was wondering if anyone knew if it is hard or not to make a custom widget that updates live the amount of subs a youtube channel has from sites like social blade or something??
Unfortunately socialblade doesn't share their numbers via API, but I think this can be done via youtube API itself
sorry about the delayed response @viral patrol , I sorta fell down an overlay editing rabbit hole.. Anyway, I'm using Roll Credits.
Add a section to credits-sections:
<div class="credits-sections__item">
<h2>Top</h2>
<ul class="people-list col2" id="tops"></ul>
</div>
And just below:
window.addEventListener('onWidgetLoad', function(obj) {
const recents = obj.detail.recents;
let session = obj.detail.session.data;
userCurrency = obj.detail.currency;
add:
addEvent('tops', "Donator: "+session["tip-session-top-donator"]["name"]+" - "+userCurrency.symbol+session["tip-session-top-donator"]["amount"]);
addEvent('tops', "Cheerer: "+session["cheer-session-top-donator"]["name"]+" - "+session["cheer-session-top-donator"]["amount"]+" Bits");
This should do the trick
I'm actually really proud of what I did with the hypecup and I wanna show it off 
Oh, thanks!!!
You css guys are freakin' nuts. It's amazing what you come up with!
Okay, I can get that first section in there okay, but when you say just below, can you specify? Sorry, like I said, I'm a css idiot @viral patrol
So find:
window.addEventListener('onWidgetLoad', function(obj) {
const recents = obj.detail.recents;
let session = obj.detail.session.data;
userCurrency = obj.detail.currency;
and make it look like
window.addEventListener('onWidgetLoad', function(obj) {
const recents = obj.detail.recents;
let session = obj.detail.session.data;
userCurrency = obj.detail.currency;
addEvent('tops', "Donator: "+session["tip-session-top-donator"]["name"]+" - "+userCurrency.symbol+session["tip-session-top-donator"]["amount"]);
addEvent('tops', "Cheerer: "+session["cheer-session-top-donator"]["name"]+" - "+session["cheer-session-top-donator"]["amount"]+" Bits");
okay, it worked.... sorta.
I'm having the weirdest issue with using twitchjs like in the "OverlayCounters" example. It connects but it doesn't get any callbacks on messages. When I add username/oauth I can even send messages and then it gets the callbacks from its own messages, but not anything from outside
I think I screwed it up though... I copy pasted the code above & this is how it turned out
I'm guessing I screwed it up by not placing paragraphs correctly?
Well that is unfortunate, I see the chat messages in the WS frames in the browser debugger, they just don't seem to trigger the callback
ouch, looks like it was just giving an empty string in channel=obj["detail"]["channel"]["username"]; but I still saw the messages in the debugger because something else in streamelemts was opening a connection to the right channel 😒
also I was seeing the sending messages because I specifically used a call that took the channel as parameter
The API is open










