#dev-chat

1 messages ยท Page 18 of 1

turbid wadi
#

make sure it's kappa/v2 now

eager junco
#

Is this correct https://api.streamelements.com/kappa/v2/tips/?

true ridge
#

ask @turbid wadi if you need something

#

yes

eager junco
#

404 status code

exotic vessel
#

no

turbid wadi
#

@exotic vessel OMGScoods

exotic vessel
turbid wadi
#

what was the old endpoint you used @eager junco

eager junco
turbid wadi
#

GET/POST/PUT?

eager junco
#

GET

#

was just using it last night and it was working perfectly

turbid wadi
#

now

#

{id} = the users id

eager junco
#

"\"channel\" with value \"shiptoast\" fails to match the required pattern: /^[0-9a-fA-F]{24}$/"

#

oh

#

WEW

#

I need to sign requests now?

turbid wadi
#

?

eager junco
#

"message": "invalid signature"

#

on /v2/channels/me

static wigeon
turbid wadi
#

You have to set the Authorization header to your jwt token

eager junco
#

I did that already.

#

with the /v1/tips

turbid wadi
#

we changed the signing key, you would have to get your new one

eager junco
#

is that the Security->Personal Access Token reset or is there a different area?

eager junco
#

got it, thanks

#

just adding this, response time from v2 is 20926ms

heavy current
#
    "statusCode": 500,
    "error": "Internal Server Error",
    "message": "Darko broke it.."
}```
#

dammit darko

#

Authorization header is JWT {token} now right? not Bearer {token}?

turbid wadi
#

Bearer {token}

heavy current
#

If i do bearer token then it gives
{
"statusCode": 403,
"error": "Forbidden",
"message": "No channel found"
}

turbid wadi
#

what url?

heavy current
#

I assume I only had to change the v1 to v2, api docs don't show changes yet

#

and yes i grabbed my new token already

turbid wadi
#

It's https://api.streamelements.com/kappa/v2/bot/commands/{id} now

heavy current
#

%7

#

oh ok

#

gotcha

#

so you can't just grab the whole array of commands, you can only just grab one?

#

so top is invalid and not possible now? and you can only grab one command if you have the id?

static wigeon
#

WIP!!!

heavy current
#

kk

low sierra
toxic mica
#

is there an API for creating contests in Streamelements? i couldn't find any documentation on it

#

o WIP lol sorry

eager junco
#

doesn't look like it in the api

#

you can get the current contests though

pulsar willow
#

There is some API to auto add commands to streamelements dashboard?

wheat sphinx
#

those docs are no longer up to date

low sierra
#

V2 docs are pinned to this channel now

wheat sphinx
#

gonna add a notice to the old ones

harsh willow
#

@wheat kelp The Bot didnt Track My Host To my Friend For Alert And Chat Notify

pulsar willow
#

@copper skiff link dont work

copper skiff
#

@pulsar willow it was pulled down, because the v2 docs are out now

low sierra
#

@harsh willow This is an API channel for discussion related to the SE API. Please post in #helpdesk-twitch Thanks

harsh willow
#

Thought bot stuff was Api

#

@low sierra

#

since Bot isnt tracking Either my Friends Host or My Host

low sierra
#

it's only API related if you are using the API

harsh willow
#

or Alerts not working

low sierra
gilded lotus
#

Hi! I have an app that allow to put Tips in another system (Streamlabs) cuz in my country we have a lot of limitation to use PayPal. I was waiting for this release, but in the docs the "tips" part is in blank. It's posible to do such thing?

low sierra
#

We will soon have many more tipping options for everyone globally so you won't need to use streamlabs for tips anymore

#

What country do you live in? @gilded lotus

gilded lotus
#

@low sierra argentina!

low sierra
#

You'll have other options available ๐Ÿ˜ƒ

harsh willow
finite heath
harsh willow
#

thought this was api stuff

finite heath
#

your video is from the website, so not related to api ๐Ÿ˜ƒ

harsh willow
pulsar willow
#

can u make a example using streamelements api?

#

@everyone

tribal moat
pulsar willow
#

i dont find json data link

#

@tribal moat

tribal moat
#

Yeah I don't know anything about that, I put the monkaS because you tried to tag thousands of people for that

pulsar willow
#

@tribal moat how did u get partner?

tribal moat
#

Not sure if it's a trick question ๐Ÿค” the usual way? LUL

#

Met the requirements

pulsar willow
#

u are a devloper?

tribal moat
#

No

pulsar willow
#

so what u are?

tribal moat
#

I've been streaming for over 3 years, I put a lot of time into it, met the requirements, applied for partner, got partner

pulsar willow
#

hmm

tribal moat
#

Did you mean Twitch Partner or Discord Partner?

pulsar willow
#

u have thediscord partner hoodie?

tribal moat
#

Because I got my Discord Partner for being a Twitch Partner pretty much

pulsar willow
#

discord partner

tribal moat
#

I have both the original and the new version of the hoodies, yes

pulsar willow
#

OMGGG

#

i want too ๐Ÿ˜›

#

xD

tribal moat
#

I got the original one for being one of the first partners and I won the second one at a Discord Partners only hoodie giveaway ๐Ÿ˜›

pulsar willow
#

xD

#

but now how i use streamelements api?7

tribal moat
#

So I wear the new one and I let my girlfriend wear the original one ๐Ÿ˜„

#

I have no idea, i'm not a developer

pulsar willow
#

so nice

#

I can get discord partner

#

by become a devloper

#

and build bots etc

#

so

#

@everyone

#

where is the api json links?

undone dove
#

It's not that easy (hints we are developers and don't have discord partner + it's just a hoodie!) Google Discord api

pulsar willow
#

@undone dove

#

Where are the api links?

undone dove
#

The ones for Discord you have to Google them, ours are in the channel description โฌ†

honest bone
pulsar willow
#

On {version}i put v2?

honest bone
#

Try it 4HEad

pulsar willow
#

Lul

#

I dont know where i get the {channel}

#

@undone dove

languid trellis
#

Is it no longer possible to get purchases in your store with the API?

#

Oh nevermind, the endpoint ignores incompleted redemptions by default

copper skiff
languid trellis
#

Yeah I saw those, but they're far from complete by comparison

#

And they include some typo's

finite heath
#

please point out the typos here @languid trellis

languid trellis
#

I'll compile a list of them first and then post them all in one go

languid trellis
#

/activities/{channel} -> Get a channel's activities.
/activities/{channel}/{activityId} -> Get a specific activity.
/activities/{channel}/{activityId}/replay -> Replay an activity.

/bot/{channel} -> Get the bot's current status.
/bot/{channel}/levels POST -> Gives the user a level.

/bot/commands/{channel} -> Retrieves all of the commands.
/bot/commands/{channel}/default -> Get all of the default commands.
/bot/commands/{channel}/{commandId} GET -> Retrieve a specific command.
/bot/commands/{channel}/{commandId} PUT -> Update an existing command.
/bot/commands/{channel}/{commandId} DELETE -> Delete an existing command.

/bot/timers/{channel} GET -> Retrieve all of the timers for an account.
/bot/timers/{channel}/{timerId} GET -> Retrieve a specific timer.

/channels/{channel} -> Get a channel's info.
/channels/{channel}/emotes -> Get a channel's emotes.
/channels/{channel}/users/{userId} -> Updates a user's accessLevel.
/channels/{channel}/access/{userId} -> Remove a user's access.

/contests/{channel} GET -> Get all contests by a user.
/contests/{channel}/{contestId}/bet GET -> Get a user's bet.
/contests/{channel}/{contestId}/refund -> Refund a contest.

#

/logs/{channel} -> Retrieves all logs for a given account.

/loyalty/{channel} GET -> Retrieves a channel's loyalty settings.
/loyalty/{channel} PUT -> Update a channel's loyalty settings.

/points/{channel}/reset/current -> Resets the user's current leaderboard.
/points/{channel}/reset/alltime -> Resets the user's alltime leaderboard.

/sessions/{channel} GET -> Get a user's session data.
/sessions/{channel} PUT -> Update a user's session data.
/sessions/{channel}/reset -> Reset a user's session data.
/sessions/{channel}/reload -> Manually reload a user's session data (calculate values).

/stats/{channel}/daily -> Get a channel's daily stats.
/stats/{channel}/monthly -> Get a channel's monthly stats.

/store/{channel}/items/{itemId} GET -> Get a single item.
/store/{channel}/items/{itemId} PUT -> Update an item.
/store/{channel}/items/{itemId} DELETE -> Delete an item.

/store/{channel}/redemptions THESE HAVE NO INFO
/store/{channel}/redemptions/{redemptionId} THESE HAVE NO INFO
/store/{channel}/redemptions/{itemId} THESE HAVE NO INFO

/tipping/{channel} GET -> Retrieve a specific channel's public tipping settings.
/tipping/{channel} PUT -> Update a channel's tipping settings.

/uploads/{channel} GET -> List all the assets of a user.
/uploads/{channel}/{assetId} -> Delete an asset.

#

@finite heath Some of /store items lacked any info so I listed that too

finite heath
#

are you saying these have spelling mistakes ?

languid trellis
#

Yes

#

This is the correct spelling

finite heath
#

so you corrected them and then wrote them here?

languid trellis
#

Indeed

#

I hope it's clear what belongs where

wheat kelp
crimson sandal
#

Anyone has any idea about adding the !subage command???

pine bough
#

@crimson sandal As far as I know the sub date is currently not accessible using Streamelements, because of limitations due to Twitch API. A Twitch forum post, that can help you create your own tracking for sub dates, can be found here: https://discuss.dev.twitch.tv/t/getting-date-someone-subscribed/2169

languid trellis
#

The api endpoint for store redemptions is currently capped at 4, but it doesn't seem clear as to how I would request the next 4 if I have more

copper skiff
#

@languid trellis with the previous version you had to use ?offset=x for the points leaderboard. maybe it's the same thing for redemptions

languid trellis
#

Ah, I'll see if that still works

#

Got it to work, thanks

winged garden
#

exist)*

hardy cedar
#

@winged garden PM me your code and Iโ€™ll see if there are any errors with that

karmic zenith
#

So i scrolled through this channel to see where my scripts are mistaken. i see i had to edit the v1 to v2 in the api link, and i updated the JWT token, but i'm still getting a 404 - anything else i need to edit? i have limit and offset on the links, but that shouldn't be an issue i would assume

#

and i'm trying to catch /tips

finite heath
#

check the new docs linked in the topic

karmic zenith
#

i already have

finite heath
#

alright, then I wouldn't know

#

post the URL you're using and getting a 404

#

someone who knows will see it and respond

karmic zenith
finite heath
#

@turbid wadi any ideas?

copper skiff
#

there is no endpoint listed yet on the api doc for tips

karmic zenith
#

so it's not possible to grab data from /tips?

turbid wadi
#

@karmic zenith it is missing the id and set the offset to 0 if there is none

#

https://api.streamelements.com/kappa/v2/tips/{id}?limit=100&offset=0

karmic zenith
#

the offset is set through the var "offset", and it's supposed to grab all tips, not just 1

#

i was able to do this before the v2 update

turbid wadi
#

it's the account id, it should get as many as you specify in the limit

karmic zenith
#

ah - id as in name?

#

so it doesnt need a bearer jwt token anymore?

turbid wadi
#

it does

karmic zenith
#

i found the account id

#

let's have a look

#

that works - it wasnt necassary to use the acc id in v1, correct? i assume the JWT token is used as the app holder now, so i can grab the tips from anyone (if i have the acc id) now

turbid wadi
#

only if that user has granted you access to do so

karmic zenith
#

ofcourse - good implement tho !^^

vivid oak
#

Hello! Is there any way to get a full list of viewer points through the /points route? I've tried using /points/<account_id>/top?offset=<XXX> but it won't let me offset more than 1000. Is there another way to do this?

copper skiff
#

@vivid oak are you using the v2 of the API?

vivid oak
#

Yes

copper skiff
#

@vivid oak there you go https://api.streamelements.com/kappa/v2/points/<channelID>/top/<amount>?offset=<offset>

vivid oak
#

Interesting, the offset works past 1000 if you do /points/<channelId>/top/<amount>?=offset<offset> but not if you dont use <amount>? Side note: I might be crazy, but the amount doesn't seem to matter. I get 25 results regardless of what I put

copper skiff
#

@vivid oak just tried without the amount param, and I got 29 entries https://api.streamelements.com/kappa/v2/points/<channel>/top/?offset=0

vivid oak
#

@copper skiff I did the same and got 100. But when I specify any amount I get 25

copper skiff
#

yeah same, it might be using the default value no matter what. i'll report it

vivid oak
#

@copper skiff Thanks a ton!

shut raven
#

Hello! I've been using v1 to get user's points on my channel, but it doesn't work anymore. I see v2 requires channel id, instead of channel name, so how can I get that? ๐Ÿ™‚

worldly mauve
#

@shut raven on your dashboard in the upper right hand corner click on your name which will take you to your account info there is "account ID" i believe that's what you need

shut raven
#

Thanks a ton @worldly mauve ! For some reason I assumed it was a Twitch thing!

honest bone
queen vigil
frigid shell
#

https://api.streamelements.com/kappa/v2/points/<CHANNEL>/top/10 everytime sends 25 users insted 10

low sierra
#

@frigid shell Thanks for the report. The devs are now aware and will get it resolved.

frigid shell
#

oke

static wigeon
#

amount will be updated to limit tomorrow.

frigid shell
#

ok i will try

digital hemlock
#

was the "type" filter removed from the /activities endpoint ?

#

Previously we could add type and it would appropriately change the response, this doesn't seem to be the case anymore. (ie: &type=subscriber)

frigid shell
#

its work thanks @static wigeon

static wigeon
#

@digital hemlock I'll look into it. For the time being you should be able to do.
https://api.streamelements.com/kappa/v2/activities/577c0455f9a31ea72a36b2b3?limit=300&types=redemption

digital hemlock
#

seems to work. so type became types maybe eh ?

#

allows multiple parameters ?

wheat sphinx
#

try with types=redemption&types=tip

#

should work

tribal geyser
random karma
#

Ty daddy

tribal geyser
#

doubt many people here use rust

#

i was thinking about making a go version

winged garden
tribal geyser
#

Are you using the streamelements id for the channel? that changed between v1 and v2

#

@winged garden

winged garden
#

ah ty very much

tribal geyser
#

np

winged garden
#

hey so that's nothing with the api but I have a question: how can i save a js array on a server and read it again? and not temporarily :/

tribal geyser
#

well the array will live for the length of the program by default, to make it consistent you need to look at a method of saving the data to disk. You can do that by just saving it as json, putting the raw data in a file, a little database, you have a few options. Google and stackoverflow are your friend :)

winged garden
#

I usesd google like 10 hours and now we are no friends anymore ... but maybe stackoverflow? ๐Ÿ˜„

#

ah stackoverflow ...... same as google :/ i searched hours and hours and I don't understand anything :/

broken jackal
#

possible to restart (reset all bets) a contest via API?

#

restarting via website clears the pool, restarting via API does not

broken jackal
#

DELETE request to /contests/{channel}/{contestId}/stop also returns 404, all parameters are correct.

#

ah the docs are incorrect, the correct endpoint is /close not /stop

honest bone
#

Thanks @broken jackal ! We will fixed asap!

haughty flume
#

Really random question - not sure if this is something I can ask in here or not.. but I noticed under modules you can have the bot post in chat based on sub durations. What is the bot reading in the API that combines different subscription types to add up the number together to the totoal # of months someone has been suscribed for?

honest bone
#

Not sure if I understood properly, but this: https://dev.twitch.tv/docs/pubsub and
Example: Channel Subscriptions Event Message it tells you how many months someone is subbed in the event message

brave ginkgo
#

@haughty flume unfortunately the API doesn't have anything like that, twitch with publish the event with the correct number, but they don't give access to the number through the api

gilded lotus
#

Hi! I'm a bit confused, i'm trying to figure out how to use the api, but i have not a "auth" method .. Where are an example or more info?

tribal geyser
#

@gilded lotus authorization is needed for certain requests, so make sure you actually need it first. If you do, you would add the proper JWT (json webtoken) in the header you send

#

The examples of using it are a bit lacking with the v2 api, they had better curl examples in the old version

gilded lotus
tribal geyser
#

I believe so, i haven't used it personally and I have no ability to test right now @gilded lotus

pulsar willow
#

I want talk private with streamelements dev pls

honest bone
#

y

tribal geyser
#

Me too

static wigeon
lyric wedge
tribal moat
low sierra
cinder lintel
true barn
random karma
hardy cedar
pulsar willow
tribal moat
#

Ruined CoolStoryBob

hardy cedar
wooden pulsar
#

So much fun here, it's unbearable!! FeelsOkayMan

gusty turret
tribal geyser
#

Recommendation: add back the curl examples to the docs, they are pretty standard for REST apis, and a runnable example to test that you're code isn't dumb is nice.

honest bone
#

@turbid wadi

torn kiln
#

hey boys, little question about the GET/PUT api requests who are requiring the JWT check

#

how can we check the clients' secret? In order to send the header auth?

brave ginkgo
#

they have to give you their token

tribal geyser
#

that is one area where oauth flow is generally nicer

brave ginkgo
#

yah, they would need to build an oauth and app system for that

tribal geyser
#

JWT makes the application simple, but leads to situations like that :P

torn kiln
#

so actually there is no way to automatically get the token?

#

like in a standard oauth flow?

#

by instance we're trying to do a POST /contests/{channel}/{contestId}/bet on our website, but obviously we need the users' token in order to do it

#

and we've the users' already logged in, and we've their twitch data available too

#

so wondering how this stuff is handled on the streamelements site

#

wondering if we might use the twitch' token instead ๐Ÿค”

tribal geyser
#

No, you need the SE token, so you need to prompt them and ask them for it

torn kiln
#

(guess not)

#

which means going through all the login thing via the streamelements' site

#

sorry for the questions but I'm a bit confused, according to what you told me there are less issues in doing a !bet command in the twitch chat than doing it via POST ๐Ÿ˜‚

tribal geyser
#

right now it feels really targeted towards mods for streamers who are willing to give the JWT to the app directly. OAuth flow is what allows a nicer interaction with getting the info behind the scenes ยฏ_(ใƒ„)_/ยฏ

#

Any devs can feel free to correct me

torn kiln
#

Oh I see ๐Ÿ˜ฆ

#

hoped to have a more streamlined way to handle it, maybe by re-using the twitch' token

queen iron
honest bone
#

We are aware of the issue, hopefully will be back up by sunday ๐Ÿ˜ƒ if you have any current questions, please ask away someone will be glad to help @queen iron

tribal geyser
#

Can we have a github version of the docs so that they can still be usable in instances like this? :P

honest bone
#

Sure slik, make it Kappa

tribal geyser
#

Maybe if your docs weren't down!

honest bone
random karma
wheat sphinx
#

oh nice someone fixed it pepeL

honest bone
random karma
#

@wheat sphinx yw

frank torrent
#

I'm having trouble using the API switching from v1 to v2. I'm using the same Authorization: Bearer <token> in all my requests but keep getting a 403 back with the message "No channel found"

#

I thought it might be due to a recent username change for me but I also tried using a new twitch account to no avail

#

For example I'll make a request like this:


GET https://api.streamelements.com/kappa/v2/stats/[CHANNEL NAME]/daily

Host: api.streamelements.com
Content-Length: 0
Authorization: Bearer [JWT TOKEN]
Accept: application/json,text/html

#

which returns JSON {"statusCode":403,"error":"Forbidden","message":"No channel found"}

languid trellis
#

You can no longer use channel name, but have to use the ID

honest bone
#

That is correct, we no longer use Channel Names. You can fin your Account ID the same place your Bearer is.

frank torrent
#

ahh

#

thank you!

honest bone
#

np

frank torrent
#

I've been smashing my face at my keyboard for like 30 minutes wondering what silly auth thing I missed, thanks so much

honest bone
#

any time ๐Ÿ˜ƒ

queen iron
honest bone
#

we use IDs instead of channel name now

queen iron
#

I'm using the id. I'm able to get items but not the redemptions

honest bone
#

cant currently test, but i think its working pepoThink

pulsar willow
queen iron
#

I figured out what was going on with the redemptions . I had an old test item in the store pretty sure it was pre api v2. I deleted it and created a new item and it is working now.

queen iron
#

After doing some more testing it looks like you can only see redemption history with /store/{channel}/redemptions i have been unable to pull new redemptions

lusty meteor
#

I feel stupid for asking this, but what is StreamElements authentication strategy for the API? Do we just pass along the JWT with each request? I'm not seeing anything in the docs, sorry if I missed something.

#

Nevermind, I'm blind and didn't see the Authorization header in the Security tab for each request in the API. โค

deft trail
#

Is this even possible?

honest bone
#

From what i can tell, nope

deft trail
#

Not just this source? Or generally?

#

Sorry for my crap english skills...

honest bone
#

no problem, it could be possible, but it needs to return plain text, i believe.

#

Let me try something pepoThink

deft trail
honest bone
#

also, maybe someone else as a more experirence answer

low sierra
deft trail
#

Thanks @low sierra ! ๐Ÿ˜ƒ

carmine scaffold
#

Very stupid question -- does anyone have a sample of the request body that the chat bot sends when running a custom command at a REST endpoint? Surely the username of who is using the custom command is sent, but I can't find any such sample in the StreamElements documentation anywhere.

carmine scaffold
#

** Maybe a better way to ask the question: when writing an API for custom chat commands, how do I get the username of the person who sent the command?

carmine scaffold
#

I figured it out -- I needed to send the username as a route parameter in the urlfetch ๐Ÿคฆ

lusty meteor
#

Does StreamElements have a similar Socket API to the StreamLabs Socket API?

I'd like to avoid polling /activities/{channel} as I don't want to run into rate limiting issues.

tribal geyser
#

no, its all done through a REST api currently

deep shuttle
#

Hey guys I was wondering that if i could add a local provider for tipping platform. Any ideas how i could manage it, i've got API's from streamelements as well as the provider that i'm going to integrate

hardy cedar
#

What provider @deep shuttle

deep shuttle
#

It's an Indian provider, called paytm mostly streamer use it in stream to receive donations. It could be a valuable addition if donation could be received through it and displayed donator's message on stream

cinder lintel
#

@deep shuttle we have several payment processors on the list that we are working with to integrate. I am asking to see if that one is already there. If not, go for it. Just don't want you to do work that is already in process :)

terse solstice
#

Do you have a API for the activity feed?

deep shuttle
#

@cinder lintel Sure, i'll be glad to help you guys out. If possible is there any trello board for StreamElements. Also any pointer toward such kind of payment processor with REST api integration that you would suggest will also be a great help for me ๐Ÿ˜ƒ

lusty meteor
#

I've found myself rewriting a Node REST wrapper three times now, each time for a different project, for working with the StreamElements API. There is only one other I've found on NPM and it's unmaintained and setup for v1.

So I released an unofficial, full-featured wrapper to NPM last night. https://www.npmjs.com/package/node-streamelements

finite heath
#

@lusty meteor I'd love it if you could link to all these projects using our API

lusty meteor
#

I'll see if I can share them, two of them are for streamers who requested some game integrations done. Not sure if they want their secrets revealed.

#

The third should be open-sourced in the next week or two -- it works with StreamElements to control events in Minecraft over RCON. The existing version of this for Minecraft was done via a game add-on and stopped at the previous Minor release and is now deprecated.

finite heath
#

very interesting

#

if you make tools that can be used by more than one streamer let us know, perhaps we can find a way to help get the word out

tribal geyser
#

If api bindings for languages are wanted I could make some rust ones. Doubt many people will be using them compared to node though :P

#

I'm currently using them in 2 projects, one already linked before and one in the works

lusty meteor
#

@finite heath Absolutely! One thing I'd beg for is an Activities Socket API. Would make life a whole lot easier if we could just stream activities to an app in real-time.

tribal geyser
#

sockets api, oauth flow, pretty standard nowadays tbh

hardy cedar
#

@lusty meteor Really interesting! I'm going to try it out and see how it works!

eager junco
#

What are yall doing to constantly gets subs and follows when pubsub and webhook have subscription limits. IRC and follower endpoint?

honest bone
#

Subs get sent to us through pubsub, we just listen. Follows we have to check for every so often. non dev answer 4HEad

eager junco
#

Oh, so yall don't have pubsub limits. Dang. I was hoping there was another way.

tender hemlock
#

is there a specific format a custom api needs to be in (or, not be in) ?

tribal geyser
#

plain text, i would imagine

low sierra
#

yes, plain text

tribal geyser
#

yea, i doubt its gonna expect json, html would be silly

#

json could make a bit of sense, as it allows you to pass more info

silk urchin
#

Heylo so i wanted to use the Omni alerts from NerdOrDie wihc currently don't support streamelemnts but i can get it setup with custom css on a local machine but i require the api key to get the info from streamelements. Is tere a possibility i could get tat so i can get it setup?

tribal geyser
#

get what api key exactly... your own?

silk urchin
#

yup

tribal geyser
brave rock
#

JWT token for Ground Control isn't available from a delegated account - you have to go there with the actual account?

honest bone
#

yes

#

for obvious reasons

brave rock
#

That's fair, now that I think about it.

#

Ground Control doesn't allow access to delegated accounts though, which confused me for a minute.

molten cipher
#

hello, someone can help me? ๐Ÿ˜ƒ I need information what structure must have csv file to import points from him. Now i have 2 column (username, current points) but this not work

copper skiff
#

@kierownikw#1317 use this webpage, it should work with the format you have (username, points)

tribal geyser
#

that is indeed the format, you just cannot have a header on each column

pulsar willow
#

anyone know why i would get { "statusCode": 404, "error": "Not Found" } when i do the /points/{channel}/{user}/{amount} api?

#

@low sierra omg u use my api's

pulsar willow
#

ok got a bit father now im getting Cannot POST

#

oh its PUT not POST thats why lol

molten cipher
#

i known this site but in streamelements site in import tab is "import CSV" so, please show me structure this file ๐Ÿ˜„ I can't import my file because i don't know what must be in the file

#

previous i can import my .csv on Ankhbot/Streamlabs import but now import is faild :/

cinder lintel
#

especailly since that site uses the format yours are currently in

molten cipher
#

few hours ago i can import file where i have 2 columns (username and current points)

#

no I have only faild ๐Ÿ˜ฆ

#

import +34k records from api it is time-consuming

low sierra
#

username,twitch id,current,alltime is the format

Twitch ID ignored so there just needs to be something in that column

molten cipher
#

thx ๐Ÿ˜ƒ but this very important, every line must be enden in linux style (/n not /r/n)

copper skiff
#

@molten cipher have you tried the link we posted before? it works with your current file, no need to edit anything

molten cipher
#

I make few hours ago my own file from current list of leaderboards

#

two columns, username and current points

copper skiff
#

you can trust it

molten cipher
#

yep but import from api +34k records it is time-consuming ๐Ÿ˜ƒ

low sierra
#

The import process on streamelements site and on filter.dj are exactly the same. I was just told this from our lead developer.

copper skiff
#

you don't have to do anything, you paste your CSV in the text field, and it's imported. it takes literally seconds

molten cipher
#

Ok, thx for info ๐Ÿ˜ƒ but manual for the import csv will be welcome ๐Ÿ˜‰

cinder lintel
#

@molten cipher, larger uploads with the API have been done in less time. 34k records is not that large

queen iron
#

I'm still seeing problems with the API and the GET redemptions running GET https://api.streamelements.com/kappa/v2/store/{token}/redemptions only returns

"_total": 0,
"docs": [],
}```

and there should be 1 redemption. If I go to the store dashboard and approve or deny the redemption it will then show the approve or denied request.
queen iron
#

FeelsBadMan I figured it out. I was missing the Query Parameters ?limit=25&offset=0&pending=true

lusty meteor
#

Not sure if this is a recent change, but if you attempt to create a store redemption while an item is on cooldown it just returns Bad Request. I don't believe this was true until recently.

If this is intended functionality, perhaps we can improve the messaging as to why it was not redeemed?

honest bone
#

There has not been a change to the api since v2 of the site, i believe

waxen jetty
#

Was the module section of the API removed when we changed to v2 btw?

honest bone
#

@turbid wadi

turbid wadi
#

@waxen jetty ups, looks like we forgot to document that

#

we'll add it to the docs in the next days

waxen jetty
#

Ah, wonderful! Thanks for the info! โค Great job as always!

lusty meteor
#

Is there a way with the Points API to add an amount of points to all chatters, like what !addpoints all {amount} does?

#

Setting username to "all" in /points/{channel}/{user}/{amount} doesn't seem to do the trick.

fiery oriole
#

So, a friend and I am currently writing a mod for Minecraft. Currently it takes StreamLabs socket API and triggers events based on the queue. So, a new sub gets a custom chicken spawned in game with their name, that sort of thing. If it's a gifted sub, the same chicken is spawned, but the gifter's name is attriubed to a baby zombie that's riding the chicken.

#

We're looking in how StreamElements could also be an option.

#

This is somewhat important to me, because this mod will pretty much define the streaming platform I'll be using for a good while.

#

Having access to things like competitions and the like would be awesome, winner gets to be spawned in game for example.

#

And redeption could be setup and available via the store.

#

But it's things like .. bits dropped, how much .. did we prestige .. who resubbed and how many months .. this is vital

#

I'd more than welcome any discussion on the backend of StreamElements and how this could fold into the mod. I've been weaving streaming concepts into modpacks for ages, and this could take it to a whole new level.

#

Game Design, in Minecraft, based on chat interaction. The madness.

cinder lintel
#

I will be watching this discussion with high levels of interest ๐Ÿ‘€

honest bone
#

don't know much about programming and such, but couldnt you just fetch this information from Twitch itself? just listen to pubsub for sub messages or something?

cinder lintel
#

that would work for the first part, but having access to other area's, like loyalty and the other areas could be highly useful. And if they just want to get all the info in one spot, that might be easier programatically

fiery oriole
#

the potential exists for youtube, mixer, etc .. but having one core path to the streaming platform makes sense also, indeed, it could value add information

#

the old addage, let the streamer stream, let the streaming platform support them .. i think, fits as well

static wigeon
#

@fiery oriole You should be able to join our websocket and get all events about a channel.
We don't really have any documentation about it right now, but if you just dig around for 5 minutes in the network tab I'm sure you'll find something.

#

I'll be around a little later today if you have any specific questions

primal spade
#

Hey guys, couple questions: I'm working on a custom twitch game for a streamer and I'm currently using streamelements to send whispers to people (in response to commands) through the api. What's the feeling about this? Is this something I should avoid doing? We were hoping to avoid chat spam, which is why whispers

#

Second question: is it possible to update a text field in an overlay through the API?

cinder lintel
#

@primal spade the bot is able to send whispers in commands created in the dashboard, so whispers are fine. The second part is above my pay grade

primal spade
#

Haha np. And thank you ๐Ÿ˜ƒ I didn't wanna be doing something StreamElements didn't want me doing ๐Ÿ˜„

hardy cedar
#

Unsure though, never dealt with the overlay side of the api

primal spade
#

I saw that, i wasn't sure what I needed to send to update a widget

#

they only show widgets: [] but not what the items in that array looks like lol

hardy cedar
#

You could to just GET it and see how it looks on the streamer's overlay

primal spade
#

oh yeah, duh. I'm embarassed I didn't think of that lol

hardy cedar
#

It's all good

#

I think the example is just of a blank overlay.

primal spade
#

That makes sense. I'll get one of the overlays that is already up and see what that looks like. Thanks ๐Ÿ˜„

west knot
#

I looked above for importing a csv file on the website I have 4 columns without the column names in the first row. The columns are formatted [username, twitch_id (0 defaults), current_points, alltime_points] however it keeps failing. fields are terminated by a comma, enclosed in double quotes, and each row is seperated by a '\n' character. What am I getting wrong?

warm aurora
#

How do u use this api? Do I use it with the bot?

tribal geyser
#

you use it in some program, what that program is can vary.

#

@west knot that's not the format for the csv, the website explains what the format is

soft idol
#

Is there an api for StreamElements statistics?

low sierra
#

Scroll down to /stats

soft idol
#

It is only for my channel. I want to work with all statistics if it is possible.

low sierra
#

Get the stats for other users?

soft idol
#

Yep

low sierra
#

That's not something that is offered for privacy reasons. The stats contain tip, sub, and cheer information that shouldn't be public.

#

Unless the user wants to give someone else access to that information

soft idol
#

I don't want to use private info. I wanna to process some statistics from https://stats.streamelements.com/c/{channel}. I see hidden point https://api.streamelements.com/kappa/v2/chatstats/stats/{channel} in connections, but JSON-response contains only top's.

low sierra
#

What stats are you looking to have from other channels?

soft idol
#

Number of messages from user on channel per day, number of emotes per day on channel. I look for it to find trends on some channels.

low sierra
#

I'll ask the devs if that is information we are currently tracking and can add an endpoint for

#

number of messages from each user sent in a channel?
ex. Channel - Taus Dec 31, 2017
UserA - 20 messages
UserB - 38 messages
etc.

#

and total number of emotes used in a channel for each day?

soft idol
#

Yeah, something like that. For emotes likewise.
Channel - Taus Dec 31, 2017
EmoteA - 20 messages
EmoteB - 30 messages.

#

Thank you for the answer.

eager junco
#

Am I missing the auth button or is there not one yet?

#

Wondering if I have to send users to your site to manually grab the jwt

tribal geyser
#

you do

#

there is no authorization flow

umbral crag
#

oi

#

anybody here ๐Ÿค”

#

Is it only possible with the api to have events, when for example a tip happends, or is it just possible to make a request to get the info

static wigeon
#

@soft idol There'll be an update for the stats endpoint within the next week or so ๐Ÿ˜ƒ

#

Which should provide a much more flexible API.

hardy cedar
#

Yeeeesss! i really wanted this.

#

Now i can have an alert in my discord text channel whenever a sub or tip happens.

main remnant
#

Hey had a few questions about the API for anyone that might know. I want to use the Tips endpoint to get all tips that have happened after a specific time. Secondly I am not sure how to get an authorization token for the required header

hardy cedar
#

there is a "createdAt" property, if that's what you meant.

main remnant
#

there is a createdAt property in the data that the end point returns. But what i mean is the ability to put a parameter in the url and only get tips that happen after that created at time so I only see new tips

#

as for authentication do you mean geanerate a invite link and use the code in the invite link is my authorization header parameter?

low sierra
#

auth is the JWT on that page

hardy cedar
#

^

#

There are no parameters for date,

main remnant
#

ok, the info is not there

#

ahh so there is no way to only show recent tips

hardy cedar
#

As said, only parameters are the channel

#

You could do it manually with your own lines of code, but there are no parameters from our side.

main remnant
#

ahhh its a bandwidth thing tho on my end. I take a look tho thanks for clearing things up for me!

shrewd trail
#

with the auth token what is the param name for it ? it is the jwt or something different to be able to add it into the header ?

hardy cedar
#

It's the jwt @shrewd trail

shrewd trail
#

so since it is a get request shouldnt you be able to do ?jwt=tokenhere and that should also work too or not ?

hardy cedar
autumn belfry
#

hey guys, quick question regarding the /channels/{channel} endpoint... does that just return 200 if that particular channel uses Stream Elements CURRENTLY (which is what I'm looking for) or does it provide return data for any user that may have logged in/connected their twitch to check out the bot/package even once?

#

trying to work in an integration into my bot that will add a SE badge/blurb/icon (something that identifies them as a current user of SE)

low sierra
#

Pogchamp @static wigeon @wheat sphinx

wheat sphinx
#

it returns a 200 when that user connected their twitch account once

autumn belfry
#

dang

#

any possibility of something like what I'm looking for being added to the api at some point? over 2 million ppl across discord see the output of now live daily and aside from being a nice bit of flair on the announcements it would be really great promotion for SE in general

static wigeon
#

@low sierra pepoSpinClap loading

low sierra
autumn belfry
#

I'll take that as a no...

static wigeon
#

So you are looking for an indication of them being live with se?

#

Or simply the fact that they are an active user

autumn belfry
#

basically that they are an active user of SE

static wigeon
#

I'll try to bring it up, but for the time being /channels/{channel} is the closest thing to what you are looking for.

autumn belfry
#

ok, thanks for the response... figured it was at least worth asking about

static wigeon
#

Yeah for sure no worries ๐Ÿ˜ƒ

fiery oriole
#

that moment when you see the streamlabels flowing through the socket

cinder lintel
#

lol

#

โค

chilly yoke
#

I am having an issue with pulling my channel stats though the API it is returning with all 0 when I know there should be values there

#

also tied using monthly and it returned nothing as well

merry plume
#

hello guys

#

i'm at the very beginning, i'm wondering how can i call your APIs.. i'm interested in the autentification process

#

is there any javascript boilerplate?

tribal geyser
#

The authentication is simple using JWT for any endpoints that need it.

merry plume
#

yea i'm not really familiar with that..

#

is there any example I can use? of a request? in php or javascript

lament cradle
#

JWT authentication is literally the same everywhere. You log in and get a token that you use in header for each request from then on

#

there is nothing special about stream elements here. Just google API JWT authentication and you'll find plenty

merry plume
#

hum, the token isn't given to me by stream elements?

lament cradle
#

it is given to you by stream elements in exactly the same way like any other API in the world pretty much ๐Ÿ˜ƒ

low sierra
#

@merry plume you can find it by clicking on your name in the top right of the dashboard to enter account settings

merry plume
#

perfect

#

about the snippet? can i find it somewhere?

#

(found the token)

chilly yoke
#
                    url: "https://api.streamelements.com/kappa/v2/CALL_HERE", 
                    type: "GET",
                    beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization','Bearer TOKEN HERE'); },
                    success: function(response){ 
                    },
                    error: function(response){},
                });```
#

assuming that is what you are asking for

merry plume
#

wonderful. thank you.

merry plume
#

one last thing, that i should be okay. the channel id requirestd, is actually the account ID?

#

it's the only id i can find in there

#

or is the twitch token maybe?

chilly yoke
#

use that and you can get your ID

merry plume
#

yo guys, it's me again

#

i'm having some troubles in working with the apis, specifically the contest api.
I managed to create a contest and to open it by adopting the apis, however, i cannot seem to be able to choose a winner.

honest bone
#

Close it first?

#

If that's an endpoint

merry plume
#

hum, i was wondering if i had to close them before

honest bone
#

Close than pick winner

merry plume
#

wonderfull! i'm working on that.

#

but i only see the "stop" api

#

not the close api. is that the same?

low sierra
#

It is

#

I'm actually really curious how you managed to do this after you're done and it's working well for you

#

with the connection LoL

merry plume
#

oh.. i would be more than happy to tell you

#

i was afraid you were thinking of me as an idiot because of my questions ๐Ÿ˜„

low sierra
#

No no not at all

#

I wish more games had an API like this so that we could integrate with more games

merry plume
#

as soon as i'm able to close the contest via api, it's finished. and it seem to work pretty well tbh

static wigeon
#

@merry plume What language are you writing it in, and is it open source ๐Ÿ˜‰ ?

merry plume
#

i'm using javascript and php

#

it's.. broken source lol

#

i'm working on this since a couple days, as a proof of concept

#

but it turned to be quite complex

static wigeon
#

lmk if you want contributions, because i really like the idea.

merry plume
#

oh ๐Ÿ˜„

#

yeah, it seems like something userful, isn't it?

static wigeon
#

indeed it does

merry plume
#

do you think it could be, someday, implemented into the system itself?

low sierra
#

throw it on github ๐Ÿ˜ƒ

static wigeon
#

Hopefully one day

#

But i do have a ton of other things that needs to be fixed up first ๐Ÿ˜„

merry plume
#

๐Ÿ˜„

#

i will make the code public once its a bit polished and secured. right now i'm making it for a particular streamer.. so a lot of it is hardcoded in there

static wigeon
#

That's alright, lmk.

merry plume
#

i'm just wondering about the closing thing.. isn't the contest automatically closed once the time runs out?

#

it seems like that from the interface

static wigeon
#

Yeah currently voting stops after the time you specified.

#

But i might look into creating an option without the timer and letting the user close it.

merry plume
#

but i tried to use the /winner api after the timer runs out

#

and it still doesn't work

#

so, from APis, you have to close it "manually" even tho it's closed by default?

static wigeon
#

You would have to close it first and then select the winner.

merry plume
#

ok, i'll update you soon ๐Ÿ˜ƒ thanks for the support. I really appreciate all your work.

#

oh, btw, i know that you don't have access to Riot apis because they denied the key or something?

#

in order to access that information i adopt a 3rd party API

#

i think it would be precious for you too.

#

i'm using it in order to abandon nightbot and use only stream elements.

#

nope, it's not working... it doesn't even provide me with an error

#

the answer from the API is "null".

#

it's weird.

#

and curl_errno is not triggered...

#

okay, i've managed to read the answer from the curl. it's
<pre>Cannot DELETE /kappa/v2/contests/TWITCH_ID/5a5e8222ac5a8600016bb38f/stop</pre>

#

where both my twitch id and 5a5e8222ac5a8600016bb38f (contest id) are right.

#

so i don't really know what i'm doing wrong at this point.

merry plume
#

@static wigeon sorry to bother you

#

i've tried to tweak with the content type a lot, by removing it or putting application/json. doesn't change.

#

so i don't really know what else to change.

#

i've tried to close also a contest that is still running, doesn't work.

#

maybe it has to do with the fact that the response expected is 201 and not 200 like in the other calls i make

#

there it is: it's a 404.

#

the resource isn't found.

#

well.. that's it. I can't figure this out.

#

hopefully you will be able to give me some insight ๐Ÿ˜„

merry plume
#

i'm 90% sure that it's something on your side. i've tried to use an external software to perform the requests

#

and i still get 404

#

if anybody wants to investigate, i'll be here for a couple hours

low sierra
#

The devs are in Europe so they're likely all asleep but I bet you'll get some replies here tomorrow

merry plume
#

oh, like i am.. so i'm supposed to be asleep.

#

๐Ÿ˜›

#

it's one of two cases: either i'm so noob i'm missing something very stupid, or it's something on the server side

low sierra
#

Well you don't have to be if you don't want to. You're an adult after all.

#

๐Ÿ˜ƒ

merry plume
#

i'm 9!

#

(:D)

low sierra
merry plume
#

more like 29. lol

merry plume
#

Further information:

  • i've tried to use other apis with the DELETE, and they work.
  • i've tried to refund a contest, and i get the 201 status. however, from the interface, the contest keeps running.
  • i've tried to DELETE (without the stop) a contest, and it works.
merry plume
#

I figured it out.

low sierra
merry plume
#

I still think that the close api is broken, but i managed to pick a winner without closing the contest.

merry plume
#

@static wigeon yo

gray hemlock
#

Hey, i cant import my deepbot points.. i put the API in the Box , press Update and nothing happend

upbeat dawn
#

ยฏ_(ใƒ„)_/ยฏ

finite heath
merry plume
#

Hello. I've found a bug on your APIs.

#

The refund API doesn't work properly. It gives to me status 201 but the contest is not actually refunded.

#

as you can see from id in the URL and in the api request, the contest is the same. I've called the refund, but the "refund" button is still active on the dashboard (i.e., it's not refund)

#

I've ofcourse tried to refresh the page, doesn't change.

#

I've tried with multiple contests just to be sure.

finite heath
#

I think that's a bug across the system

merry plume
#

@finite heath what do you mean?

#

(hi)

finite heath
merry plume
#

Oh, okay! thank you

merry plume
#

@finite heath would it be helpful if I added the screenshot in there?

#

specifying is only an API problem?

finite heath
#

sure

merry plume
#

oh apparently it's not only an API problem O_O

#

i didn't realize that

merry plume
#

yo, the twitch token can be used to perform requests on twitchs apis?

thin mason
#

Hey, anybody here who can send me the link to the streamelements api documentation?

grand wing
thin mason
#

Thanks. Am I correct that i get all the credentials and everything as soon as i register?

grand wing
#

yep, should be visible under your account settings

thin mason
#

Thanks alot.

chilly yoke
#

Still having issues getting the monthly stats via the API, daily seems to be working but monthly stats return 0 values.

undone dove
#

That's the one from your older post

#

I'll ask

chilly yoke
#

Thanks @undone dove

wheat sphinx
#

@chilly yoke what is the exact URL you're hitting? there needs to be a ?from=<date> and ?to query param with dates iirc

tulip snow
#

Hey what's going on?

wheat sphinx
#

@chilly yoke the docs are wrong then, you need a ?from=<ISO date> and ?to=<ISO date> query param for it to work. You can see it if you load the dashboard with the network tab open

#

https://api.streamelements.com/kappa/v2/stats/57b88bc0a302c08f2ea15ef3/monthly?from=2017-12-27T15:00:16.841Z&to=2018-01-26T15:00:16.841Z for example

dreamy mica
#

I am curious how you guys count emotes on your stat website

chilly yoke
#

Thanks @wheat sphinx that fixed the issue!

merry plume
#

hem, am I the onlyone that cannot reach the api page anymore?

#

the dev brings me here

finite heath
#

@merry plume fixed, thanks for reporting

merry plume
#

that was fast ๐Ÿ˜„

finite heath
#

we aim to please

#

plus @wheat sphinx is the fastest draw North of the Sahara

merry plume
#

tell him to fix the refunds then ๐Ÿ˜›

finite heath
#

o?

merry plume
#

refunds are not working

finite heath
#

refunds of what?

merry plume
#

of contests

finite heath
#

oh

merry plume
#

i was just kidding

#

i know u guys are busy ๐Ÿ˜ƒ

finite heath
#

^^

thin mason
#

I cannot find any documentation about how to pass the jwt_token. Any idea where to find it? ๐Ÿ˜ƒ

livid lotus
thin mason
#

ty

#

Found that too, but is this a bearer token? Pass it via url?

livid lotus
#

yeah it is

thin mason
#

ok ty

wheat sphinx
#

@thin mason you need to pass it via a header
Authorization: Bearer <your jwt>

merry plume
#
function callSE_POST_API($url, $data)
{
    $curl = curl_init($url);

    //build json from data
    $data = json_encode($data);

    //pack header
    $header = array(
        'Content-Type: application/json',
        'Authorization: Bearer ' . SE_JWT_TOKEN
    );

    curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec($curl);

    curl_close($curl);

    return $result;
}
#

@thin mason an example for you

#

in php for a post call

#

remember to decode the json response (json_decode)

thin mason
#

THanks the information that it is a Bearer token was enough! ๐Ÿ˜‰ Was just wondering, why it's not written anywere there... ๐Ÿ˜› Or in the api documentation. Maybe I just was not able to find it! ๐Ÿ˜ƒ

tribal geyser
#

@thin mason it is listed in the "security" tab, but i think they assume people messing with those things to know the general JWT flow

pulsar willow
#

Anyone have a suggestion I wanna make a twitch bot with java I'm new to twitch and decent at java is there any premade bots I could base mine off ?

warped lichen
#

Hey, all! I was looking to add StreamElements as an OAuth integration, but I can't find any documentation on the matter. Is this functionality available/planned?

low sierra
#

@warped lichen Not available right now but it's a future possibility

willow plank
#

Quick and curious question, what is the status or ETA of OAuth API?

low sierra
#

It's not currently planned

willow plank
#

@low sierra That sure sounds strange, because that is not what I was told when I asked about API access last

#

^ I do not remember whom I was in contact with then, but priorities change, sure ๐Ÿ˜ƒ

low sierra
#

You chatted with our lead developer who told me earlier today that it's a future possibility but not in the current plans. You're absolutely right about priorities being fluid.

#

That was back in October

willow plank
#

Thout sound about right, I think, I'm just not a fan of making a text-box for people to post the JWT token without any authorisation they are whom they provide to be. Anyhow, thank you for the headsup ๐Ÿ˜ƒ

low sierra
#

No problem. I hope it's something we can add in the future ๐Ÿ˜ƒ

willow plank
#

Me too, I'll just make a public encryption between the user and my servers to be sure.

cinder lintel
#

question. Is there a way to pull their twitch name? Because you could oauth with twitch, and ask for the JWT, and if they don't match....

#

idk, I ahven't played with the API yet, so maybe it isn't something possible

#

@willow plank

scenic palm
#

Hello ! I have a small question ... Can I talk to someone in order to solve my issue?

hardy cedar
#

@scenic palm Ask what you need help with

scenic palm
#

I got my answers in support

#

๐Ÿ˜„

#

thank you!

jaunty lintel
#

Question, is the user defined "name" of the points visible on the API? I'm writing a discord bot to check them and I don't see that anywhere

pulsar willow
#

Hi guys, i would like to talk with some dev about adding new feature to "Current song" addon.
P.S. I have sample code, and proof of concept ๐Ÿ˜‰

ocean barn
#

is there a way that i can use this in SE?

waxen jetty
#

That should make the bot respond with the random joke from the dadjokes page.

ocean barn
#

wow, thank you, that worked a treat

waxen jetty
#

Splendid! ๐Ÿ˜ƒ

merry plume
#

Hello guys: is anyone aware of a bug in the delete contest api?

honest bone
#

are you closing it first?

merry plume
#

let me double check

#

they are all closed, right?

#

so now, if i call the contests api in get, i see there is no active contests

#

i then try to delete the first of the "contests" list, let's say, 5a82360dee99e2000179b4d4

#

it gets me a 204 as answer. everything seems okay.

#

but if i call again the contests, i get now an active contest (ANOTHER)

#

5a8167c8d1ea6000012e9b30

#

and the one i've deleted seems to be gone.

#

so it seems to work, but it's also weird.

honest bone
#

ill let one of the devs know ๐Ÿ˜ƒ

merry plume
#

I can provide more details if you need me to

jaunty lintel
#

Asking one more time before I just assume no and make it a variable in my programs config file. Is the user defined โ€œnameโ€ of the points available through the API?

low sierra
jaunty lintel
#

Aha. Under loyalty. Not points. Got it

merry plume
#

@honest bone yo, any news on the contests thing?

honest bone
#

I havent had time to speak with anyone. maybe @wheat sphinx could have a look

merry plume
#

i'm doing some testing right now

#

i can speak with @wheat sphinx if he needs any data about the problem

merry plume
#

okay, i've got some new information: the whole thing seems to work. the behaviour seemed weird because I had SO many contests that the new ones that were popping up were old ones (yet, still to have a selected winner) and so the interface were giving those to me

#

i've just discovered that the "contests" provided are 25 max.

#

and the last of those can be "active"

#

however, if i may suggest, the active response is not consistent with the interface

#

one can have N active contests, one on top of the other, and not just one as the API tells

#

i do recognize that from the interface you cannot open a contest until you close/refund/select winner on the active one

#

but from the api there is no such limitation, one can open 100 contests, and all of them are active.

#

the whole active thing just works in a way I can't predict... I've deleted 25 contests, and no contest popped up as active (from interface). Then i deleted another 25, and one was active (again from interface).

honest bone
#

So, I've relayed your message, and i was told we are aware of the issue. So thank you for the information, I don't have an ETA on the fix, but it's on the list. ๐Ÿ˜ƒ

merry plume
#

thank you mate!

#

how can i follow updates on the matter?

honest bone
#

He will send a messenger pigeon your way

cinder lintel
#

be prepared with crackers, cause those things can be painful if you don't feed them

frank cloak
#

still waiting for that messenger pigeon monkaS

west seal
#

Is there a oauth flow or do I need to have the users copy the JWT manually?

cinder lintel
#

manual JWT right now

west seal
#

alright

#

thanks

ocean barn
#

not sure if this is the place to go but....
i'm want to make my own API lookup database. I want to have someone in chat enter a cmd (eg. !funfact) and it will return a random pre-entered fun fact.
any ideas?

stone belfry
ionic eagle
#

morning/afternoon beautiful people of SE opieop while browsing the control panel i have noticed few changes in the menu . Looking good as always ๐Ÿ˜‰ just quick question what happen to the youtube / mixer integration ? it used to appear as [coming soon] feature . Now i couldn't see it anywhere ResidentSleeper

honest bone
#

We just removed the design, does it matter? pepoThink

#

We still have plans to support Mixer in the future if that's what you're worries about, youtube is coming shortly

ionic eagle
#

No I am not worrying about it bud , that question was mainly out of curiosity haHAA

#

I am confident that our awesome SE team is working on it ๐Ÿ˜„

ocean barn
#

Hi @stone belfry i'm a little confused with your response, are you saying that SE has it's own API that i can edit for my own cmd on stream?

stone belfry
#

@ocean barn If you have a custom api hosted on your own server you can use the supplied command variable to call that api. So if you have a random response system that you created you will use the variable SE supplies in the commands window to call that when the command is typed.

!command
the bot contacts the api, gets a response and replies in the twitch chat.

I'm not sure on the specifics of how the backend needs to be for the bot to grab a response though.

But I assume a db would make the job harder than it needs to be.

ocean barn
#

Ok, that sounds more complicated than i first thought.
Is there anything, other than !quote in SE that I could utilize?

stone belfry
#

You could use ${random.pick}

#

So !funfact as the command and then the response would be ${random.pick 'fact 1' 'fact 2' 'fact3' 'etc'}

wise idol
#

im not sure what /points is meant to represent

stone belfry
low sierra
#

@wise idol you posted in the correct place. Are you looking at the documentation?

wise idol
#

yep. it isnt super helpful though

#

when it says 'top x' users i dont understand what they're the top users of

#

most messages?

low sierra
#

/top is the "Current" points leaderboard

stone belfry
#

Sorry @wise idol I failed you ๐Ÿ˜ฆ

wise idol
#

and what are the points

#

or so to say, how does one up points, lose points, etc.

low sierra
#

a channel's loyalty currency

wise idol
#

alright, that answers it. thanks

low sierra
#

viewers earn currency by watching the stream and following, subscribing, tipping, etc. and can use those points in chat modules/games, contests, giveaways, stream store

wise idol
low sierra
#

current or top is the live view of the points leaderboard and goes up and down where as all-time is more of a guage of loyalty because it only increases by watching and following, subbing, tipping etc.

stone belfry
#

@low sierra Do you know of any api's that can be used with the command variable? Random jokes or anything?

low sierra
#

I used to know of a couple endpoints but they've gone down FeelsBadMan

#

@cinder lintel may know

stone belfry
#

Anything really, even examples I can look through would work.

cinder lintel
#

Hmm, I have one that gives some puns, though it only gives like 10 or so. I just googled "API _________" and tried them until I found something

pulsar willow
#

hey you smart people :)anyone know if hours can be pulled from the api

low sierra
#

@static wigeon ?

static wigeon
#

onslaughtH ?

low sierra
#

endpoint for hours?

static wigeon
#

Nope hard

low sierra
#

Ah FeelsBadMan

static wigeon
#

Write it down somewhere KKaper

pulsar willow
#

ya that would be aweosme

#

also could the same endpoint have the total number of users for that channel?

#

or is that one for that

pulsar willow
#

nvm thats not needed as i can use providerId from the channel get to see if there a valid user of SE

pale nacelle
#

Hey guys

#

I have a question

#

How I can get access to get top emotes?

static wigeon
pale nacelle
#

Hey thx a lot!

warped lichen
#

Where can I find the documentation that gives an overview of bot integration?

#

I want to make a bot, but I'm unsure how a streamer would integrate it into their stream

#

And if there's a general outline for any restrictions a bot may have.

For instance, I have a main webapp that will POST to my bot upon certain events (or my bot will poll, whatever works). When a request is received, will my bot be able to POST tips, points, etc to the streamers account (and trigger any animation, etc)?

cinder lintel
#

@warped lichen for the last part, I highly recommend checking out twitch's dev TOS

#

there are a lot of restrictions for bots, but that is the best place to know

warped lichen
#

@cinder lintel good to know! I'll check it out. So does that mean I'm really writing a Twitch bot that just happens to interface with StreamElements? API aside, this bot doesn't actually reside within SE somewhere?

cinder lintel
#

What are you writing the bot for? we have a chat bot for twitch already, I can refer you to more information

warped lichen
#

Without going into too much detail, I need to be able to POST tips to a channel based on events from our platform

#

Streamlabs and Streamtip have this functionality behind a conventional API (authed by OAuth2) and we want to also bring StreamElements onto our platform. It was my understanding that to post tips, etc on SE you had to create a bot of some kind

cinder lintel
#

by channel, do you mean discord

warped lichen
#

I mean post tips to a Twitch streamer's SE account

#

Sorry, that was worded awkwardly

cinder lintel
#

ahhhh, now I get it, lol

#

anything will work, even a simple form on a website

#

the auth is a bit different here, you have to use the JWT token, but it still works

warped lichen
#

Are there docs for the basic flow of getting this JWT and performing basic operations?

#

And generally how our platform + SE + Twitch interact?

cinder lintel
warped lichen
#

That gets me the endpoints, but I'm looking for details about getting and passing JWT tokens, etc

#

Basic auth stuff so that I can use the endpoints

cinder lintel
#

@warped lichen you will have to have people supply the JWT, there is no way to do it automatically

#

since !roulette is a command

static wigeon
#

@pulsar willow I'd say no, not quite sure how that'd work ThonkingButCool

warped lichen
#

Anyway, one more thing as a sanity check. If I post a tip using the API, will that trigger and overlay effects that a "normal" tip would (notification, message, etc)?

static wigeon
#

@warped lichen New docs are incoming (@low sierra ๐Ÿ˜ก)
Also if you wanna trigger an alert either create an activity or send it directly to the websocket.

honest bone
#

get the deserter @low sierra to write it

static wigeon
low sierra
static wigeon
#

eth address pls.

honest bone
#

eth intergration

warped lichen
#

@static wigeon so posting a tip won't automatically trigger an alert? I have to post the tip and use an activity or send to a socket?

static wigeon
#

@warped lichen Could you explain me your use-case ?

warped lichen
#

I want to post a tip using the API, but still have an alert appear on-stream for that sweet recognition

#

I'm wondering if that alert will appear automatically when I POST a tip, or if I have to trigger it separately

static wigeon
#

Then i'd just create an activity for sure.

#

you can also emit an event called event:test
With this payload

event: {type: "subscriber", name: "FeelsGoodMan", amount: 44 }
listener: "subscriber-latest"
#

anyhow, we'll try and push out the docs asap.

eager vale
#

What algorithm do we need to use for JWT?

#

Also, where can I find my secret in SE?

zenith folioBOT
eager vale
#

Maybe I'm not understanding how JWT works then

low sierra
#

the token is needed for authentication when using certain parts of the api

#

In the docs it lists which endpoints require authentication

eager vale
#

Right, with the locks

#

Where does the JWT go in the request?

low sierra
#

in the headers

#

Authorization: (string)

eager vale
#

That's it?

low sierra
#

yep

eager vale
#

Seems too good to be true

#

Alrighty, be back with more questions... I'm sure ๐Ÿ˜›

#

Thanks! ๐Ÿ˜„

#

Wow, that's magical

lusty meteor
#

Is there a way to add points to all users through the API? I'd essentially like to do the equivalent of !addpoints all {number}

Passing all as a username to PUT /points/{channel}/{user}/{amount} doesn't work and the bulk update PUT /points/{channel} requires a full payload of current and alltime points it seems.

jaunty lintel
#

Hey there, with the loyalty points API, is there a way to get the total number of people with points, for the rank? I know how to get the user's rank, but not like this (rank 45/234)

chilly yoke
#

Did something change with /Stats? I am getting a 404 error when calling daily and monthly

eager vale
#

Is there a web socket (webhooks, pub/sub, etc.) endpoint? I don't see one in the documentation, but I figure it doesn't hurt to ask.

static wigeon
#

There is, but no real documentation for it yet.

eager vale
#

๐Ÿ˜ฎ

#

What's the endpoint?

#

I'd like to avoid long polling if I can

static wigeon
#

@eager vale let me know what your use case is, and i'll try and guide you in the right direction ๐Ÿ˜‰

eager vale
#

I'm working on a simple Electron app that lets users update text and image fields (essentially an expansion of the Ground Control app).

#

We're looking at moving from my custom browser source to SE for an online tournament production.

#

So, I'm trying to make the process as convenient and efficient for the broadcaster as I can.

hardy cedar
#

@eager vale are you just informing us or do you need any help? Seems like an amazing idea, really cool

eager vale
#

Oh, Styler was asking for information on my use case for web sockets.

hardy cedar
#

Oh my b

#

Should've just looked up LUL

eager vale
#

haha

static wigeon
#

What does your current browser source exactly do?

#

Because our websocket is mainly one way.

eager vale
#

Changes scores, team names, etc. realtime.

#

I just need to know when one of the layers for the overlay changes

#

"widgets" in the overlay object

static wigeon
#

There is an event called overlay:update which is essentially when an overlay is saved.

eager vale
#

ooooo

static wigeon
#

That event relays the entire overlay object

eager vale
#

Yasss

static wigeon
#

Which you could do a diff on to see what changed

eager vale
#

meh

#

It's really tiny

#

๐Ÿ˜›

static wigeon
#

Looks something like so.

eager vale
#

Is the wss endpoint wss://api.streamelements.com/kappa/v2?

static wigeon
#

Here's a small snippet i saved from some time ago.

const accessToken = '';
const socket = io('https://realtime.streamelements.com', {
transports: ['websocket']
});

// Socket connected
socket.on('connect', onConnect);

// Socket got disconnected
socket.on('disconnect', onDisconnect);

// Socket is authenticated
socket.on('authenticated', onAuthenticated);

// New event received
socket.on('event', onEvent);

function onConnect() {
console.log('Successfully connected to the websocket'):

socket.emit('authenticate', { method: 'jwt', token: accessToken }));
}

function onDisconnect() {
console.log('Disconnected from websocket')
// Reconnect
}

function onAuthenticated(data) {
const { channelId } = data;

console.log(`Successfully connected to channel ${channelId}`);
}

function onEvent(event) {
// Deal with events
}
eager vale
#

Oh, sweet

static wigeon
#

So in this case listen to overlay:update rather than event

#

Let me know if that helps a bit.

eager vale
#

Will do! Thanks!

ember folio
#

hey dudes

static wigeon
winged lantern
#

Hi! I practically know nothing about coding but looking for codes or coders that can help with making a chat box overlay more unique?

low sierra
#

@winged lantern Are you looking to improve the chat widget itself or the overlay as a whole? What does your current scene look like?

pulsar willow
#

๐Ÿค

wide vortex
#

Hey, anyone from SE
Maybe it have some ways to connect SE points , that using in roulette with any bots in discord channel?
@high swallow

#

I want to use one points wallet for discord and twitch channel in same time

cinder lintel
#

A discord bot is planned

merry plume
#

yo, i would like to catch a string that has spaces as command parameter value
any way to do so? (right now each substring of the value is given as a different parameter ${1}, ${2} etc)

#

okay, apparently that's not true. ${1:} contains the full string, even with spaces. So next question is: is there any string replace function that i can use?

#

${queryescape} does the work. thank you.

cinder lintel
#

@merry plume glad we could help KappaTrio

merry plume
#

HAHAHA

#

You are my inspiration โค

#

Next level support.

cinder lintel
#

Hahaha. I JUST woke up. My favorite support questions are the ones you asnwer yourself 30seconds later, lmao

merry plume
#

Okay, i've got a good one: is there any api call that allows to make the bot say something?

#

i know that i can generate a mpeg file, but how about making it talk?

low sierra
#

There is

merry plume
#

i'm sorry, i wasn't clear

#

say like in voice

#

not like in written message

low sierra
#

There is a TTS endpoint yes

merry plume
#

something like /speech but that reproduces the message

low sierra
#

just a sec

merry plume
#

sure

merry plume
#

yep, that returns a mpeg file

#

what i'm searching for is something exactly like /say, but with speech. so on a specific channel.

low sierra
#

well it has to output somewhere so there would need to be an application that plays the mpeg on the streaming machine

#

certainly more complicated than making the bot post something in chat

merry plume
#

yeah, but as the bot is able to reproduce something like tips/follows/etc messages

#

but anyway, i get the point that is substantially different.

low sierra
#

sounds like something our devs would need to build into the overlay editor so that the sound plays through the browser source

merry plume
#

yeh

low sierra
#

It's been suggested on the ideas board

merry plume
#

i'll up that there then, thanks terra.

#

Since you are here, can i bother you for another issue i'm having?

low sierra
#

I'll give it a shot

merry plume
#

thx. I'm trying to use the /say functionality to launch a commercial on a channel.

#

StreamElements is added as editor for the twitch channel, and i'm passing as message to the /say api '/commercial 120'

#

this is the result i'm getting.

#

seems like it's not parsed.. or something.

low sierra
#

We would need to request the permission through the twitch connection

#

Something that I believe we'll be doing

#

Other bots request that permission

merry plume
#

Well, that is for offering your api that does the commercial launch

#

like a button in the panel that launches a commercial. in that case you act via twitch apis and you launch a commercial, that's okay and you need a particular launch_commercial scope

#

in this case tho, shouldn't the streamelement message be read just like any other message?

#

given the SE it's an editor.

low sierra
#

I'll check with the bot dev on it

merry plume
#

i'm afraid that this is more something on the twitch side that on yours..

low sierra
#

It might be because the SE account is a verified bot account

#

so it needs to have the scope first

#

whereas a regular user can just type /commercial

merry plume
#

I've spoke to the twitch guys, it seems like probably SE has some commands whitelisted and /commercial is not among them.

#

Do you know anything about it?

low sierra
#

Could be. Some commands such as /w are disabled

merry plume
#

Okay, i'll wait for some confirmation on that if possibile. In the meanwhile i'll try to work around it by using the bot renaming function

digital pebble
#

Hello! Are there any other "hidden commands" such as - ${random.chatter}, that would be possible to vary the bot interactivity with the chat?
For example, a person writes "!Slap" and selects a random person from the list of viewers. And the bot responds to the chat "Waylands is slap random.chatter"
Is there something similar?

(this is Google.translate, sorry)

cinder lintel
#

The $(random.chatter) is a variable you can use to do what you want. Other than that, you can check out the variable list in the chat commands part of your dashboard to see what is available

low sierra
#

@merry plume I've been told that /commercial will be whitelisted beginning tomorrow

merry plume
#

oh wow

#

that's wonderful!!

#

Thank you so much @low sierra

unique nymph
#

Morning all, I was really curious, is there a way via the API to pull a list of all users that currently has points for a specified channel?

merry plume
#

With a bit of work you can use this one.

#

Multiple calls using the offset will bring you the whole list.

unique nymph
#

My concern was the quantity of calls and rate limiting

merry plume
#

"quality"..?

unique nymph
#

doesn't matter, realised I was mis-reading the doc!

#

I assume there is no update on any form of OAuth flow for the JWT yet?

winged lantern
#

@low sierra im looking to pretty much have my own chat overlay created. A custom one that's not currently an option but one made specifically for me.

honest bone
#

@merry plume /commercial is out now.

merry plume
#

Thank you very much guys.

merry plume
#

Is there a way to redirect as whisper the default commands? For instance, !followage?

cinder lintel
#

There is no way to set it for default commands, but I have an api you can use for followage, so you can do a custom command @merry plume

merry plume
#

Any chance there is a variable I can use? I've made a !points command in that way

#

like {user.followage}

grand wing
#

you want a command that shows for how long a viewer is following you?

merry plume
#

Well that is an example, I'm trying to clean up a bit the chat and having some of the bots answers as whispers seems a good way to do it.

grand wing
#

points response can't be edited

merry plume
#

The feedback from the bet, for instance, would be nice to be in whisper.

grand wing
#

if i'm not mistaken

merry plume
#

Yeah, that was my perception, I just wanted to make sure ๐Ÿ˜ƒ

grand wing
#

you can however change the command from points to something else you want

#

or disable points command and make a custom with the changes needed

#

I'm sure then you can enter that one u mentioned above

cinder lintel
#

@merry plume use this in a custom command response ${user} Has Been Following ${channel} On Twitch Since ${customapi http://api.newtimenow.com/follow-length/?channel=${channel}&user=${touser}}

merry plume
#

Oh wonderful!

#

Do you have any other ace under you sleeve? ๐Ÿ˜›

grand wing
#

I use this one $(user) followed the channel on ${customapi.https://decapi.me/twitch/followed?channel=rippz0r&user=$(user))

#

ofc change from rippz0r ๐Ÿ˜›

cinder lintel
#

pretty much the same as mine, lol. I just have variables to make it easier to share ๐Ÿ˜›

grand wing
#

yeah should be similar

sonic sedge
#

hey so i was talkin to @undone dove on facebook earlier about stream deck functionality. if i'm lookin at this right the api only supports bot functionality. what about other functionality like loading media or other functions like skipping,pause, mute, unmute notifications. or init a game that can be seen on the screen in stream w/o the use of chat commands?!

cinder lintel
#

There are hotkeys with the Ground Control application you can use

sonic sedge
#

???

#

taking a look

#

4 keybinds. and an event manager... naw i'm talkin MORE functionality

#

like i upload a sound and i want it to play when i press a button boom it plays

#

or another being another sound.

#

maybe an animation on command

rapid dew
#

@sonic sedge StreamElements integration with StreamDeck would be done on there end. We tweeted at elgato a bunch and try to get them to notice us but alas

sonic sedge
#

or a rollete wheel appearing on the stream screen and spinning away to show the winner

#

yeah but what i'm seeing here in your api theres 99% bot commands and pull features and 1 % music control

cinder lintel
#

yeah, we would need assistance from elgato for a lot of that. Right now, the only way would be through the bot commands

#

If it calls using the !redeem <item> command, you got your sound effects

sonic sedge
#

so there is not command that can be sent to the account via private key to make those happen?

cinder lintel
#

I am saying there is

sonic sedge
#

i understand theres those 4 functions i see in ground control. imo no offence thats not really all that much.

#

the theme gallery is awesome the bot chat fun is great

cinder lintel
#

I know that, GC is going to get some upgrade in the future, it isn't anywhere near done yet

sonic sedge
#

but i'm talkin things that will really interact witht he stream head on