#dev-chat

1 messages · Page 19 of 1

sonic sedge
#

how ya doin @rapid dew been a while

cinder lintel
#

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

sonic sedge
#

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.

rapid dew
#

i’ve been good! @sonic sedge hbu i apologize for my lack of api knowledge still learning 😄

magic zenith
#

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. 😃

finite heath
#

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.

true ridge
#

@magic zenith emulated event will be register as a "event:test" event in the websocket

magic zenith
#

@finite heath @true ridge thanks!

magic zenith
#

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?

finite heath
#

check the code on the top tippers page

magic zenith
#

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.

warped lichen
#

Is the API down right now? My responses are returning 500

low sierra
#

What request are you making?

warped lichen
#

POST /tips/{channel}

static wigeon
#

Can you show the payload?

warped lichen
#
    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',
        }
      }
    )
static wigeon
#

And you have proper content-type headers?

warped lichen
#

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

pulsar willow
#

am i going crazy or did this chat name just change names Kappa

tribal moat
pulsar willow
#

i could of sworen it was #api Kappa

floral fable
pulsar willow
#

ok im not going crazy

tribal moat
#

It used to be called this a long time ago, consider it a throwback seanK

low sierra
#

you passed the test @pulsar willow pepeA

pulsar willow
#

😃

bright niche
#

I legit just thought the same thing...

solar fiber
#

What is the right way to contact the SE devs about business inquiries? Is sending a direct message on twitter / fb fine?

honest bone
#

What business inquiries?

#

Regarding what, that is.

solar fiber
#

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"

honest bone
#

@gusty turret maybe a question for you? 🤔

gusty turret
#

I think its gonna be fine. Need to know more about what you want to build

#

Can dm the info

solar fiber
#

sure

shrewd trail
#

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

finite heath
#

ya, bits are part of the alerts

#

nonamenamer was just discussing connecting to the websocket and listening to events the other day

acoustic mesa
#

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 lirikSHUCKS

hardy cedar
#

@acoustic mesa Do you mean the user you want to get the info from doesn't use SE?

merry plume
#

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.

low sierra
#

It's now possible to disable the responses but the default is to have bot responses to bets

#

Added within the last few days

merry plume
#

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?

low sierra
#

Ok, it's been patched and will be in the next deployment. In the meantime specifying the property should work pepeA

merry plume
#

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!)

low sierra
#

I imagine it would be the same as in the giveaway system which has had the option for some time

merry plume
#

okay, i'll test it right away!

#

works like a charm!

#

Btw, I was wondering, what's a SE champion?

hardy cedar
#

They're basically dedicated SE helpers

merry plume
#

Oh cool. Is there a way to apply for it? I would like to give back.

hardy cedar
cinder lintel
#

I am not sure if we are full up on beta testers or not, but I might be able to get you into that

merry plume
#

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)

hardy cedar
#

Yeah just be active, we will definitely take notice!

merry plume
#

Will do 😃

pulsar willow
#

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?

pulsar willow
#

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

spring cradle
#

Heyho,
i've got a question regarding custom CSS. (text isnt working when using custom CSS)
could someone DM me please ?

merry plume
#

@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)

pulsar willow
#

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

green yarrow
#

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 HandsUp

#

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

pulsar willow
#

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

green yarrow
#

What kind of commands are you using monka

#

just curiouse bc I think I never ran into an issue with SE bot

pulsar willow
#

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

green yarrow
#

What the freak?! 😮

pulsar willow
#

this was all written in the deepbot custom command toolset

green yarrow
#

ok thats real advanced stuff true

pulsar willow
#

can't do that with the SE bot

green yarrow
#

I understand your problem now 😃

pulsar willow
#

yeah, painted myself into a corner more like lol

green yarrow
#

LUL true

pulsar willow
#

is there any way to use the API to execute a kappagen?

green yarrow
#

I am not familiar with API and all that advanced stuff FeelsChromosomeMan but maybe there is a way to trigger Kappagen with Deepbot?

pulsar willow
#

or is it only for updating bot commands, I guess that's what I was most confused on with the documentation

green yarrow
#

not sure how though Like I said I am not familair with that stuff

pulsar willow
#

oh! gotcha

cinder lintel
#

@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

green yarrow
#

no it doesnt have a respond

pulsar willow
#

hmmm I'll look into that

#

so I take it that it's not possible to use the API to do this?

cinder lintel
#

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

pulsar willow
#

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

cinder lintel
#

Yeah, it's public now. Anyone can use a custom bot name

pulsar willow
#

then ya just use that if you dont want a new bot name in your channel

pulsar willow
#

nah, just gonna skip it for now. gonna stick with deepbot

merry plume
#

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
#

guyes way dis lagg me over lay

#

any one can help me

cinder lintel
halcyon moth
#

lock dis

zenith umbra
#

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.

grand wing
#

you can make a death counter yep

#

and using same method a kill counter, but both need to be added manually

cinder lintel
#

@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.

grand wing
#

exactly

cinder lintel
#

Then you can use $(getcount kills) to get the number without incrementing it

#

and use !editcount kills 0 to reset

zenith umbra
#

So then the command would have to be “!kills” and “!deaths” to increment?

cinder lintel
#

sure, that would work. I always recommend to make those moderator or above commands, so your viewers don't fudge the numbers, lol

zenith umbra
#

Gotcha

cinder lintel
#

I would do !kill and !death to increment, and !kills and !deaths to getcount

grand wing
#

I would suggest increment !kill and !kills for total kills count

#

lol, I'm slow

zenith umbra
#

Was going to use kills and getkills

grand wing
#

that works, whatever u see more fit

zenith umbra
#

Thanks all seems to be working.

zenith umbra
#

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?

grand wing
#

sadly, no

zenith umbra
#

Ok

cinder lintel
#

it is a requested idea

zenith umbra
#

Sweet. I’ll keep my eye out then. Thanks all!

subtle cargo
#

Hi, are the "Ace Live App" feedback comments to go in this section?

cinder lintel
#

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

subtle cargo
#

@cinder lintel Who or where should I send queries/feedback too if i needed too? Thanks

low sierra
pulsar willow
#

Hi,

#

I found a glitch

low sierra
#

@pulsar willow a glitch with the StreamElements API? This channel is for developers who are working with our API.

pulsar willow
#

Well I found a glitch within streamelements roulette function.

north gulch
#

^ did you not read what he posted?

low sierra
#

We'll get it sorted out over there

pulsar willow
#

@north gulch DansGame calm down

spare palm
rapid dew
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

spice ridge
#

So you mean the fact that it just doesn't jump you back up to the top of the page when you change route...?

unique nymph
#

Is there ever going to be oauth?

static wigeon
#

Yeah we wanna add oAuth in the future. KKaper

unique nymph
#

Any ETA?

latent gulch
#

streamlabs is compatible with Strea,Elements?

cinder lintel
#

If you mean the StreamLabs OBS, then yes

latent gulch
#

@cinder lintel if you mean the program I do not use it I use the xsplit

cinder lintel
#

Ok. we are a seperate company from StreamLabs. We don't get alerts from them, and they don't get alerts from us

latent gulch
#

Can I export all streamlabs information and import it into streamelements? the followers and even those who have donated me?

cinder lintel
#

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

wispy swift
#

@latent gulch u can use the streamelements extention tool that allows export and import of streamlabs

warped pelican
#

is there an ETA for Mixer?

livid lotus
#

not yet sorry

finite heath
#

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

warped pelican
#

@finite heath apart from that the site is not loading, thanks

finite heath
crystal hare
#

Is the StreamElements Bot down right now?

#

it says "offline" but im online

unique nymph
#

there is an issue with twitch and the bot... seems it is causing a few rate limit issues

cinder lintel
#

@unique nymph can you explain the issue you are having?

unique nymph
#

@cinder lintel im not having an issue

cinder lintel
#

lol, ok

lusty meteor
#

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?

static wigeon
#

@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

small moth
#

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.

cinder lintel
#

no, for security reasons that isn't possible

#

having a better way to have security is planned

small moth
#

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.

unique nymph
#

Yeah, considering oauth is easy enough to implement, it is crazy that it isn't already implemented

lusty meteor
#

@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?

mellow tiger
#

I agree. @static wigeon is there some sort of security or performance reason that it's limited like that?

olive drum
#

I agree too.

low sierra
#

@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.

lusty meteor
#

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.

low sierra
#

Sorry about that, @lusty meteor FeelsBadMan We'll get it sorted in the AM!

wheat sphinx
#

@lusty meteor the limit set to 100k now pepel

vocal eagle
#

show some love for youtube and add song playing feature for chat 😦

unique nymph
#

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

low sierra
#

The username comes from the JWT authentication

unique nymph
#

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

low sierra
#

Yes, that would be the only way to do that.

unique nymph
#

surely that is a big security issue for the end user

#

like realistically how far away is an OAuth solution @low sierra ?

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.

unique nymph
#

may I ask why that would be the case considering it is such a simple thing to implement?

low sierra
#

That's a question for @static wigeon

unique nymph
#

thanks

pulsar willow
#

@low sierra can I test the beta version of the Android app?

silent summit
#

Can somewane help me?/

low sierra
unique nymph
#

@static wigeon are you able to comment on the above from last night?

static wigeon
#

Is this regarding ticket purchasing?

unique nymph
#

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

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.

unique nymph
#

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

static wigeon
#

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.

zealous nest
#

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?

fringe galleon
#

Hey,
is there an example on how to use the api with the JWT thing in PHP?

unique nymph
#

@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()];
fringe galleon
#

@unique nymph yeah thanks :). But just the way from the jwt token to the authkey 😃 wich of the jwt repos did u use?

vivid linden
#

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

rapid dew
reef mango
#

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.

green yarrow
#

First of all @reef mango we love you too PepoHug

#

seconde of all let me ask you something, did you change your name by any chance on twitch recently?

low sierra
grand wing
#

^

reef mango
#

Oh lol sorry newbee 🙃

low sierra
pulsar willow
#

Hey, i would like to offer you my help on an german translation as i really need it 😄

swift zephyr
#

@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 seheart keine Angst das wird noch, frag einfach was du brauchst

pulsar willow
#

habe schon mit lattemotte geschrieben, wollte mich nur anbieten eine schnelle deutsche Übersetzung für das Dashboard und die Ground Control App zu machen.

swift zephyr
#

@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 PepeLaugh

static wigeon
fringe galleon
#

Is there a way to get the progress of an e.g Follower Goal of an Overlay via the API?

static wigeon
#

There's 2 ways you can get follower goal progress.

  1. Poll the session api.
  2. Use the websocket to get realtime events.

Number 2 is the best by far.

silk pewter
#

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?

cinder lintel
#

@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

cursive yew
#

How do you save the setting for the media player? For instance the points per song request will not change.

cinder lintel
#

@cursive yew check to make sure all the fields available have a value

#

if anything is empty, it doesn't save

cursive yew
#

ok

#

Thanks you guys are awesome

maiden kettle
#

Hello everyone. quick bot question: if one uses the !command edit functionality, does it add a new one if none exists?

grand wing
#

should just give an error, tbh never tried

latent fiber
#

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 😃

static wigeon
rapid dew
sacred stone
#

Ummm how do u get the command currency and roullette

cerulean bison
#

Is there a mobile streaming app in the works?

swift zephyr
#

@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.

brave meadow
#

Can I See what the User have Stuff drin Stream Store and i Dont mean the command to Show my own stuff.

green yarrow
brave meadow
#

But Just your own requirements?

green yarrow
#

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

eager vale
#

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)

brave meadow
#

Is it possible to Change the Name of the bot? Because i want to give it a personality

#

!gc

brave meadow
#

!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 😄

low sierra
eager vale
#

What's the general response time for a question?

low sierra
#

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.

eager vale
#

Ok, sweet, thanks 😃

nocturne aurora
#

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.

honest bone
#

DM'd Alon xanUp

low sierra
#

same 4Head

static wigeon
#

yeah 4House

frail wagon
#

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..

merry plume
#

@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

formal lodge
#

Can Stream Elements only collect donations from PayPal? Or can it take a donation straight from a card?

honest bone
#

Well will be accepting more donation methods very shortly. @formal lodge

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?

unique nymph
#
  1. this channel is api dev
  2. NoD usually have an instructions readme in the package
honest bone
#

@unique nymph not for StreamElements yet.

#

@formal lodge feel free to dm me, I’ll try to help you as much as I can.

nocturne aurora
#

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

eager junco
#

yall hiring? fundev here.

static wigeon
#

Yes we are hiring engineers. KKaper

charred haven
#

@static wigeon chatstats comeback?

kindred stratus
#

@static wigeon can u respond to my pm?

tepid igloo
#

can i talk to a staff about something in voice chat?

undone dove
#

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.

tepid igloo
#

its a dev related

tepid igloo
#

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.

floral fable
vapid merlin
ionic vessel
#

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+)

finite heath
#

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 😃

ionic vessel
#

@finite heath Awesome! I'd be happy to test it out whenever.

feral ice
#

How is it going with the Cheer boss ? 😄

bleak willow
#

@feral ice soon™

feral ice
#

Great ! what about the spotify / media request thing ?

cinder lintel
#

@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

north gulch
#

YouTube >

broken jackal
#

any developers in here for stream overlays? is there any 2560x1080 options for animated overlays? lol

floral fable
#

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

broken jackal
#

bahhhh

digital spire
#

quick question as I must be blind... How do I send a test tip / donation?

#

OK NM I found it

cinder lintel
digital spire
#

always the case, look for ages, as soon as you ask you find it

digital spire
#

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

honest bone
#

@static wigeon

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.

digital spire
#

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

vapid merlin
#

@digital spire Can you add headers to the request?

pulsar willow
#

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? 😃

vapid merlin
#

@pulsar willow where do you get this error exactly? On which page?

pulsar willow
#

@vapid merlin dashboard

vapid merlin
#

@pulsar willow see dm

wispy sun
#

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?

cinder lintel
#

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)

wispy sun
#

I wanted to implement a notification via Whisper for a giveaway entry. Whispers seem to be permanent!

cinder lintel
#

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

wispy sun
#

That makes sense...not being able to delete a whisper is a huge oversight though

#

But thank you @cinder lintel

cinder lintel
#

👍

limpid owl
#

does last.fm work with the bot or overlays?

honest bone
#

no

uneven arch
#

it s there a change to get in touch with the person who developed the free overlays ?

swift zephyr
#

@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 😃

forest egret
#

Is there a way to make a Raffle every X minutes?

low sierra
pulsar kernel
#

ok

#

I have an API question

#

i have some apps that call urls to pull down the json formatted info, etc

#

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

livid lotus
#

@static wigeon ^^

rotund widget
#

: D

vital tendon
#

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? pajaL

#

Thoughts? pajaL

gusty turret
#

the relevant devs are on a conference for the next couple of days, so API answers might be delayed :x

static wigeon
#

@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

vital tendon
#

Interesting, I swear I could not find anything in the API documentation about it though

#

Thanks a lot! pajaL 👍

unique nymph
#

Neither could I @vital tendon

languid niche
#

Is there anything like this /points/{channel}/alltime But for hours watched rather than points

bold stone
#

Will there ever be a stream labs app?

cinder lintel
languid niche
#

Is there a list of everything available in the api that chatstats for example isn’t in the list on the webpage

jaunty lintel
#

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

honest bone
#

Bearer JWTgoesHere

jaunty lintel
#

perfect, now to figure out why the request is working, but nothing is being passed lol..

eager ginkgo
#

You forgot to say please?

#

So you’re getting in, getting the data, but it isn’t going out?

#

@jaunty lintel

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

eager ginkgo
#

Glad I didn’t help

#

😉

vale tulip
#

[ ... ]

languid niche
#

@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.

cinder lintel
#

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

languid niche
#

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

languid niche
#

@cinder lintel 👆

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

languid niche
#

That’s cool thanks, is there anyway to get the devs attention?

honest bone
#

Tag him again

languid niche
#

Oh is it @static wigeon I need, thanks

static wigeon
languid niche
#

😂

static wigeon
#

Thanks as always @honest bone for helping 😃

honest bone
#

No problem

static wigeon
#

So you are looking for an endpoint to get time watched correct?

languid niche
#

Yes please

static wigeon
#

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.

languid niche
#

could I not use the endpoint and call it multiple times to run from a list of users I have?

static wigeon
#

I'll try and bring it up internally, but no promises 😉

languid niche
#

Thank you

static wigeon
#

You are very welcome

#

Also there will be actual developer docs in the future

grand wing
#

nice, I want that feature too

#

and pretty sure a lot others want it aswell

static wigeon
grand wing
#

😂

languid niche
#

It’s great to have the access like this to you guys, being able to explain exactly what we want is awesome

static wigeon
#

Agreed

grand wing
#

holy cow, that leaderboard

static wigeon
#

I'm around most of the time if you have any questions at all.

#

@grand wing Just for testing kappa10000

grand wing
#

😄

languid niche
#

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

static wigeon
languid niche
#

You are amazing, thank you so much @static wigeon

static wigeon
#

np onslaughtH

#

@honest bone Here's to keep you updated aswell Keepo

honest bone
#

looks great

languid niche
#

Is that available now?

#

Wishful thinking

static wigeon
#

Not yet, gonna deploy it first thing tomorrow.

#

/kappa/v2/points/5abe9177eda0b6bab3880b82/watchtime/100

#

That's the point tho.

languid niche
#

Wow that quick, you guys are awesome. I can’t say it enough

static wigeon
static wigeon
#

And the new watchtime endpoint is live.
https://api.streamelements.com/kappa/v2/points/5a81f82ab932430001b71ed8/watchtime?limit=100 enjoy KKaper

livid lotus
#

@Rhaegal#0958 👆

honest bone
#

@languid niche

livid lotus
#

why does it happen

honest bone
#

Cause it hates you

languid niche
#

Thank you

#

It works, awesome thank you

static wigeon
#

nice to see you in here @livid lotus omegaperry

languid niche
#

@static wigeon is it limited to just 100 or is it possible to search it too?

static wigeon
#

I'd recommend doing a limit of 1000 and then using offset

livid lotus
#

@static wigeon im working on the angular now, please dont disturb

static wigeon
#

Oh right Keepo

languid niche
#

Cool thanks

west seal
#

Hey, is there a way to trigger the bit alert via the API?

static wigeon
#

Might be something we add in the future.

zinc harness
#

There is an API... Oh boy... This I will be messing with

feral ice
#

Who is the developer on the Cheer boss ? 😃 is it okay to make suggestions ? 😄

cinder lintel
floral condor
#

hey guys, quick question. Who can i talk to regarding bugs in the overlay editor? 😃

mild cipher
#

Are there any SE socket docs? Or am I just blind?

static wigeon
#

@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.

mild cipher
#

Ah thanks. I searched through discord and found your snippet in a reply to someone else which I've been using ablobreach

#

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 PepeHands 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 👌

static wigeon
#

What error does it close the connection with?

mild cipher
#

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.

static wigeon
#

Sounds good, I'll be here to help.

And also documentation is being written as we speak KKaper @low sierra

nocturne loom
#

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

true ridge
#

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

silent night
low sierra
#

That is the account ID and does not change

silent night
#

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

cinder lintel
silent night
#

oh wait sorry I take it back - is there a way to see past 500 activity results?

honest bone
#

you can see 500 of 1 event. other than that, no :/

silent night
#

yeah I had a feeling that might be the case 😦

#

thanks 😃

honest bone
#

alright, idk what im talking about, styler will help you 4HEad

static wigeon
silent night
#

😮

static wigeon
#

So we do support basic pagination via limit and offset.

silent night
#

PogChamp perfect!

static wigeon
silent night
#

thanks styler!!

static wigeon
#

np np

#

always here to help FeelsOkayMan

unique nymph
#

@static wigeon any update on OAuth?

static wigeon
#

@unique nymph Hey there, so we got OAuth added to the pipeline and we are hoping to get going within the next weeks.

unique nymph
#

Yay we have a rough ETA <3

vagrant anchor
#

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?

cinder lintel
#

@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 😃

vivid linden
#

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

low sierra
#

@vivid linden This is being fixed right now 😃

vivid linden
#

thanks @low sierra btw, i love and miss you

livid lotus
#

what about me?

static wigeon
#

@livid lotus OMGScoods

vapid merlin
#

@livid lotus FeelsAwkwardMan

livid lotus
static wigeon
#

feelsmacedoniaman👌

strong root
#

@static wigeon do you mind if I DM you?

static wigeon
#

sure.

vivid linden
#

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!

lean monolith
#

Yeah they know I've brought it up too @vivid linden . They said it's a known bug

gusty turret
#

and something we'll be fixing ^

young saffron
#

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

cinder lintel
#

then someone will answer when they get the chance

young saffron
#

id like to know if the SE alert box supports custom CSS and HTML

cinder lintel
#

It does

#

so does the event list

young saffron
#

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

cinder lintel
#

If you use our import, it should import just fine. Let us know if it doesn't

young saffron
#

ok ill give it a shot. which channel should i go to ask about some bot commands?

#

well, a very specific command

floral fable
young saffron
#

thanks

young saffron
#

@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

cinder lintel
#

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

young saffron
#

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>

cinder lintel
#

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

young saffron
#

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\

pulsar willow
#

Hello, can i get my api key, please?

cinder lintel
#

@pulsar willow its in your profile, top right

low sierra
#

!jwt

zenith folioBOT
pulsar willow
#

JWT Token or Overlay token?

#

JWT Token, that big? :))

cinder lintel
#

yeah

pulsar willow
#

Ohh, thank you!

leaden crag
#

Developers you so sexy and awesome!

static wigeon
uncut spade
#

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 😃

#

cinder lintel
#

@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

uncut spade
#

Ok, thank you so much

#

my apologies, wasn't sure where to ask, first time on here and new to SE

#

heers

#

*cheers

cinder lintel
#

If you can put together a walkthrough on how to set it up, it will make it a lot easier for everyone

viral patrol
#

There is a readme section in first lines of php file

cinder lintel
low sierra
#

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.

viral patrol
#

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"

low sierra
#

I think $(queryencode) might be the variable you're looking for

#

$(queryescape) does the same

viral patrol
#

Thanks. IDK how I missed it. I found ${pathescape ${1:}} as well, so I used it (but yesterday plain {1:} worked for me 😉

low sierra
#

yep, I've found it works without sometimes (like in the weather command)

viral patrol
#

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.

viral patrol
#

It seems that chatstats endpoint is not updating

analog harness
#

Hi could any one help me with streamelements api for a second? thanks!

cinder lintel
#

Its best to ask the question, then someone that knows the answer will be able to.. well, answer

analog harness
#

Ok thanks! Im just figuring out how the store redemption post resource works maybe anyone have done something with that?

cinder lintel
analog harness
#

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

cinder lintel
#

Are you looking to see what was redeemed, or get notifications, etc

#

I personally think you need the broadcaster's JWT for authorization

analog harness
#

no, im looking to make a call to redemp a item

cinder lintel
#

ah

#

then I will walk away from this one. I am not that savy with this part of the system

analog harness
#

😦

#

thanks anyway! 😄

cinder lintel
#

I tried thumbsup there are much more knowledgable people in here, who will answer eventually on that

analog harness
#

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

cinder lintel
#

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

analog harness
#

yes

#

i dont think i can get the jwt of the redeemer from the api

#

will check the resources

cinder lintel
#

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

analog harness
#

well with a simple oauth :<

cinder lintel
#

which we don't have yet

analog harness
#

maybe i can embed the the redemp button to redirect to streamelements web?

viral patrol
#

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

analog harness
#

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

viral patrol
#

Also I see no method for redeeming an item, only to get past redeemptions

analog harness
#

yes there is a post method

viral patrol
#

According to doc it is listing redemptions for itemId

#

But why POST and not GET?

analog harness
#

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

viral patrol
#

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

cinder lintel
#

if they redeem through chat, they are unregistered. but if they redeem through the site, they have to be logged in

analog harness
#

yes they have to login to redeem

viral patrol
#

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

analog harness
#

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

viral patrol
analog harness
#

yes!

#

that should be great

static wigeon
#

That's a good idea

#

@honest bone

viral patrol
#

@static wigeon can you pls pin my another share post with daily stats, or put into your repo (if there's any) ?

cinder lintel
#

@viral patrol 😉

viral patrol
#

I personally used pisg as chat stats, but SE API is nice to make simple stats

static wigeon
pulsar willow
#

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

vapid merlin
#

@pulsar willow what's the full url you are requesting?

pulsar willow
#

I have the authorization token in the header.

#

Wait, does it only work for specific redemptions, and not redemption types?

viral patrol
#

@vapid merlin ⤴

vapid merlin
#

sec

#

@pulsar willow - where did you take that redemption id? 5b089a3e0ddc666160efbfb7

#

thats actually a store item, not a redemption

pulsar willow
#

windows is updating... wish me luck. I'll be back in a bit.

#

Tell my children I love them!

vapid merlin
pulsar willow
#

Is the list sorted by CreatedAt I presume?

silent night
#

Is there any way to have the bot say something in the channel chat via the API?

low sierra
#

yes

#

bot/say is the endpoint

vapid merlin
#

@pulsar willow yes, there is another endpoint to perform search

sonic kiln
#

i have a question! is there any other choices for stream overlays other then the ones provided on streamelements.com?????

mild cipher
#

This is not really developer related, but you can always make your own using the SE API, or check #art-marketplace

silent night
low sierra
#

@silent night channel is your SE account/channel ID

#

or from the dashboard account page

small jungle
#

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

low sierra
#

@true ridge

silent night
#

thanks TerraBuck, I didn't realise specifically required the channel to have an SE account 😃

tame trench
#

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

low sierra
viral patrol
#

@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;
small jungle
#

@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.

viral patrol
#

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,

small jungle
#

what about gifted subs? because those should in theory have two name variables, the gifter and the gifted?

viral patrol
#

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

small jungle
#

yeah. Will try both in the meantime and see what works I guess. Thanks once again for your help 😃

viral patrol
#

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)

last thunder
#

Thanks a lot for the help @viral patrol !

viral patrol
#

Sharing is caring 😉

viral patrol
#

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)

finite heath
#

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

viral patrol
#

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

unique nymph
#

yeah that is coming from Twitch

small jungle
#

@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.

nova parcel
#

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

viral patrol
#

There is wrong order in your URL

#

First one is your channel, second one is your nickname

#

I am pretty sure both are lowercase

nova parcel
#

nope still not working

#

and the first one was my channel

#

it was my channel id

#

twitch_r.json()['data'][0]["id"]

viral patrol
#

Oh. But it really seems to be strange if service replies with success message

nova parcel
#

yeah thats why i dont get it

#

it returns a success message but doesnt succeed

#

anyone else have any ideas?

viral patrol
#

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

vapid merlin
#

@nova parcel hi

#

https://api.streamelements.com/kappa/v2/points/{channelId}/Adure/500

#

channelId = your SE channel id

nova parcel
#

ohh

#

like account id?

#

or no?

vapid merlin
#

yup, the one you have in your account settings

nova parcel
#

oh ok sweet

#

ill try that

vapid merlin
#

so you could actually skip the first helix request as well

nova parcel
#

ayyy its worked

#

thanks

vapid merlin
nova parcel
#

i thought it was the twitch channel id

#

angery

vapid merlin
#

partly our fault on not enough documentation on the API docs

nova parcel
vapid merlin
#

but whereever you see {channel} in the api, it is your account id.

nova parcel
vapid merlin
#

oh yea, thats the new one. still being worked on by @low sierra

#

a bit more readable

nova parcel
#

oo nice thanks

vapid merlin
#

but still, very much incomplete at the moment

#

if you have any other questions - ping me

nova parcel
#

alright will do appreciate it

grand wing
#

can you do one for pulling out euromillions winning numbers ygolde? 😄

vapid merlin
#

yes, but only last week's numbers

grand wing
#

xD

vapid merlin
grand wing
#

that will just make me have less money, I think I didn't explain properly 😂

#

unless it's an investment 🤔

vapid merlin
#

ahh, yes - yes it is.

grand wing
#

😄

pulsar willow
#

Can stream elements please put in the thing where you see your top chatter

cinder lintel
#

@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

pulsar willow
#

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.

pulsar willow
#

I'm streaming the development of my plugin that uses your API any help would be useful.

#

I'm kind of stuck.

cinder lintel
#

@vapid merlin maybe could help? idk

#

I wish I could help, lol. API isn't my expertise

pulsar willow
#

Y'all have a c# example? It's getting frustrating.

low sierra
#

@pulsar willow the dev team is EU based. Someone will be able to reply in the morning

pulsar willow
#

👌🏼

pulsar willow
#

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. ❤

vapid merlin
#

@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

pulsar willow
#

@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?

vapid merlin
#

@pulsar willow can you send me in a dm all the API call details and headers?

#

The exact one you are making

worn flint
#

@north nest heya its me frOKm the mobile app stuff

floral condor
#

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? 😃

cinder lintel
#

@floral condor are you talking about in the overlay editor?

floral condor
#

yeah

cinder lintel
#

that would be something for the helpdesk channels then, this is more for coding issues on people using the API

floral condor
#

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 😃

cinder lintel
#

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

floral condor
#

gonna try that 😃

#

thanks!

livid lotus
#

here <@&452524198355533825>

sturdy socket
#

waves

charred tundra
#

hhaha you got your role

pseudo flower
#

hmm breaker of things.. I must get this achievement.

sturdy socket
#

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 🤔

open haven
#

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.

viral patrol
#

This is what I use for that

#

But I am not sure what variable sits behind latest followers list

open haven
#

@viral patrol Hmm ok thanks, I'll see what I can do 😃

viral patrol
#

@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); }
}

JS: https://pastebin.com/2aCBRMJp

#

Cannot paste JS

#

I hope this is what you wanted to achieve @open haven

open haven
#

@viral patrol Oh thanks man! I'll check it out later, will be afk for a bit 😄 appreciate it

viral patrol
#

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)

plain yacht
#

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 😃

cinder lintel
#

@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

plain yacht
#

ok sry, support said to write here 😃

viral patrol
#

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.

honest bone
#

@low sierra xanUp

viral patrol
#

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).

low sierra
#

Interesting, I'll take it down and monitor it. Thanks

last thunder
#

Hey guys, How can I set a command that will count wins for Fortnite for example? from the API i assume

viral patrol
#

Can you give me URL to a page, which has your fortnite stats?

#

If there's any

last thunder
#

Not mine, but this users

viral patrol
#
<?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 😉

last thunder
#

Thank you so much @viral patrol !

viral patrol
#

OK. Fixed.

#

placeA was wins, not "place"

#

np @last thunder

sturdy socket
#

so im assuming we run this api on our own "setup"

viral patrol
#

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 😉

sturdy socket
#

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

viral patrol
#

Sure you can!

sturdy socket
#

cause ive done the light api for my alerts in the JS section atm

viral patrol
#

You can put mitm (man in the middle) for that purpose if your light api doesn't support GET parameter

sturdy socket
#

it does. but for getting a list of lights etc

#

for changing them its a put request

viral patrol
#

Also - you should hide this command from command list, so nobody can get your URL

sturdy socket
#

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

viral patrol
#

Just like that. setup a webpage which forwards light=XYZ GET parameter to your API as PUT request

sturdy socket
#

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

viral patrol
#

Bot response:

${customapi.http://script/?color=${pathescape ${1:}}}

will allow you to forward !color #FF0000

sturdy socket
#

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 😛

viral patrol
#

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)

sturdy socket
#

no idea

#

i dont think so

#

its just my website

#

i was gonna use

#

but i could figure out php for it

viral patrol
#
<?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

sturdy socket
#

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 😛

static wigeon
#

php weird

sturdy socket
#

bibelcry i sorry i so dumb with this

#

JS is my native language

static wigeon
#

that's better FeelsOkayMan

sturdy socket
#
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

undone dove
#

<@&452524198355533825> just a reminder...

sturdy socket
#

this is why i break stuff

#

so much jank

undone dove
#

FeelsGoldMan KISS, Keep It Short & Simple

#

or the moron version; Keep It Simple, Stupid!

grand wing
#

harsh 😛

sturdy socket
#

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

viral patrol
#

document.getElementById("lx".innerHTML = "Big thanks!"; - you forgot to close getEementById method 😉

sturdy socket
viral patrol
#

So... What is an issue now?

sturdy socket
#

my life is a lie

#

it does nothing LUL

viral patrol
#

Does it work @sturdy socket ?

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

viral patrol
#

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=

#

😉

sturdy socket
#

thats not last script

#

that was me just throwing stuff around cause i dont php

viral patrol
#

Can you paste it wihtout your api key?

sturdy socket
#
<?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

viral patrol
#
<?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

sturdy socket
#

now getting {"error":"Token required"}

viral patrol
#

Fixed my snippet as there is no "hex" in call, it is colour on lifx endpoint

sturdy socket
#

ah yep

#

OHHhh

viral patrol
#

But Token required - huh..

sturdy socket
#

one sec

#

lemme try something

#

yeah still saying token

viral patrol
#

Ermmm.

sturdy socket
#

im guessing its the auth thing

viral patrol
#

found it

sturdy socket
#

oh

viral patrol
#

headers were set, but they didn't go to curl options

sturdy socket
#

ahhh

viral patrol
#

Snippet above updated

#

Let me know if it worked

sturdy socket
#

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

viral patrol
#

Check if color is forwarded correctly snippet updated

sturdy socket
#

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

viral patrol
#

I know...

#

I really know it

sturdy socket
#

ah

viral patrol
#

is used as "go to id" in html

sturdy socket
#

Ahhh

#

yep

viral patrol
#

It is not parsed

#

Snippet updated again

#

try ?hex=FF0000

sturdy socket
#

but if someone does say blue it will error

viral patrol
#

Huh.

sturdy socket
#

yeah that fixed it

#

will the command example you put earlier still work

viral patrol
#

Snippet updated. You can do two commands: !hex which will forward color without '#' and !color for color names

sturdy socket
#

ohhh

viral patrol
#

You can also do a regex check on color to determine if it is hexadecimal or name

#

But two seperate 'calls' are way easier 😉

sturdy socket
#

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

viral patrol
#

Yup