You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, this documentation is outdated and completely abandoned.
A new documentation try can be seen in https://docs.streamelements.com. It doesn't have the API nor socket.io instructions so far, but it is more open for suggestions and improvements (it accepts issues and pull requests).
Shouldn't the old one be taken offline then? That's all I could find from some google searches.
I'm not looking to write an overlay/widget. What I'm looking for is documentation on writing a tool which can get real-time events from a channel's tips/bits (to write a Discord bot which writes information about the event to a particular channel, but that part isn't relevant to this)
Shouldn't the old one be taken offline then? That's all I could find from some google searches.
I'm not looking to write an overlay/widget. What I'm looking for is documentation on writing a tool which can get real-time events from a channel's tips/bits (to write a Discord bot which writes information about the event to a particular channel, but that part isn't relevant to this)
Well, you can use Astro Websockets or Socket.io. They are different implementations. Astro Websockets is still in development, whereas the socket.io version shouldn't receive anything new probably (it still uses version 2.x of socket.io).
Probably the dev page will be removed (or replaced) once the documentation on the docs page is finished (the docs page doesn't have any information about API endpoints, for example).
In that case, could you please document what the topics look like for tips/bits/subs? I'd much rather use the new thing rather than the old thing (plus I'd rather not depend on socket.io)
Yeah, Astro websockets development is still in progress, so the documentation should lack some info as well. But you can try something like follow, subscriber, tip, cheer, raid and check if they work for you.
I don't see how I could test without receiving real events though. I can't reasonably send tips every time I need to test. If the documentation had examples, I could simply write mocks to test the other end of my code.
Yeah, I agree with you about the examples and the lack of info on the documentation. Just to be clear, I'm not part of the staff, I'm just a user like you, ok?!
Well, as regards to test, you have some options, the easiest one is going to your overlays (https://streamelements.com/dashboard/overlays), create an empty one (or editing an existent one) and Emulate the event you want. Just remember to keep the option "Preview LIVE on stream" checked. Once you emulate it, it will appear for you on the websockets connection.
I can try to look for a way to trigger test events on Astro Websockets, if I find anything I will send it here.
Body:
(I tried to put all possible values, but some of them are not needed for some types. I.e.: amount, tier, gifted, message and sender are not needed for follower events for obvious reasons)
{
"provider": "twitch",
"isMock": true,
"type": "subscriber",
"data": {
"username": "usertest",
"amount": 1,
"tier": "3000"// 1000, 2000, 3000 or prime (Tier 1, 2 and 3, respectively)"message": "Test message", // User message from resub or cheers"gifted": true, // Only when using for gifted subscription"sender": "johnny"// only when using for gifted subscription"avatar": "https://a.png"// Optional, user avatar"displayName": "userTest"// Optional, displayed username
}
}
type must be one of below: follow, tip, sponsor, superchat, host, raid, subscriber, cheer, redemption, merch, fan, supporter, follower, stars, share, videolike, sparks, elixir, purchase, communityGiftPurchase, charityCampaignDonation, giveaway.
Activity
c4ldas commentedon Oct 8, 2024
Unfortunately, this documentation is outdated and completely abandoned.
A new documentation try can be seen in https://docs.streamelements.com. It doesn't have the API nor socket.io instructions so far, but it is more open for suggestions and improvements (it accepts issues and pull requests).
The events can be found here:
https://docs.streamelements.com/overlays/custom-widget-events
francislavoie commentedon Oct 8, 2024
Ah, you mean https://docs.streamelements.com/websockets ?
Shouldn't the old one be taken offline then? That's all I could find from some google searches.
I'm not looking to write an overlay/widget. What I'm looking for is documentation on writing a tool which can get real-time events from a channel's tips/bits (to write a Discord bot which writes information about the event to a particular channel, but that part isn't relevant to this)
c4ldas commentedon Oct 8, 2024
Well, you can use Astro Websockets or Socket.io. They are different implementations. Astro Websockets is still in development, whereas the socket.io version shouldn't receive anything new probably (it still uses version 2.x of socket.io).
Probably the dev page will be removed (or replaced) once the documentation on the docs page is finished (the docs page doesn't have any information about API endpoints, for example).
francislavoie commentedon Oct 8, 2024
In that case, could you please document what the topics look like for tips/bits/subs? I'd much rather use the new thing rather than the old thing (plus I'd rather not depend on socket.io)
c4ldas commentedon Oct 8, 2024
According to the documentation,
channel.activitiesshould be enough. Then you can filter it checkingdata.type.francislavoie commentedon Oct 8, 2024
The list of types aren't documented though.
c4ldas commentedon Oct 8, 2024
Yeah, Astro websockets development is still in progress, so the documentation should lack some info as well. But you can try something like
follow,subscriber,tip,cheer,raidand check if they work for you.francislavoie commentedon Oct 8, 2024
I don't see how I could test without receiving real events though. I can't reasonably send tips every time I need to test. If the documentation had examples, I could simply write mocks to test the other end of my code.
c4ldas commentedon Oct 8, 2024
Yeah, I agree with you about the examples and the lack of info on the documentation. Just to be clear, I'm not part of the staff, I'm just a user like you, ok?!
Well, as regards to test, you have some options, the easiest one is going to your overlays (https://streamelements.com/dashboard/overlays), create an empty one (or editing an existent one) and Emulate the event you want. Just remember to keep the option "Preview LIVE on stream" checked. Once you emulate it, it will appear for you on the websockets connection.
I can try to look for a way to trigger test events on Astro Websockets, if I find anything I will send it here.
c4ldas commentedon Oct 8, 2024
To trigger test events on Astro (sub, follow, tip, etc), you can use the info below:
Request type:
POSTURL:
https://api.streamelements.com/kappa/v2/activities/ACCOUNT_ID/mockHeaders:
Accept: application/jsonContent-Type: application/jsonAuthorization: Bearer JWT_TOKENBody:
(I tried to put all possible values, but some of them are not needed for some types. I.e.:
amount,tier,gifted,messageandsenderare not needed forfollowerevents for obvious reasons){ "provider": "twitch", "isMock": true, "type": "subscriber", "data": { "username": "usertest", "amount": 1, "tier": "3000" // 1000, 2000, 3000 or prime (Tier 1, 2 and 3, respectively) "message": "Test message", // User message from resub or cheers "gifted": true, // Only when using for gifted subscription "sender": "johnny" // only when using for gifted subscription "avatar": "https://a.png" // Optional, user avatar "displayName": "userTest" // Optional, displayed username } }typemust be one of below:follow,tip,sponsor,superchat,host,raid,subscriber,cheer,redemption,merch,fan,supporter,follower,stars,share,videolike,sparks,elixir,purchase,communityGiftPurchase,charityCampaignDonation,giveaway.Let me know if you need any help ;)
francislavoie commentedon Oct 8, 2024
Awesome, thanks! I'll play around with that soon.