Overwolf

Overwolf

  • Getting Started
  • Docs
  • API
  • Events Status
  • Blog
  • Q&A
  • Support

›Integrations

Best Practices

  • Overview
  • App specific experience
  • First time user experience
  • App launch performance
  • Marketing Communications
  • User journey and error handling
  • Per-game settings
  • Hotkey best practices
  • Second monitor usage
  • Data persistence
  • Reduce OPK size
  • Use Tab as an app Hotkey
  • Type definition file
  • Download Link with referral ID
  • Video capture best practices
  • Enable Developer Tools

Using Windows API

  • Using Overwolf windows
  • Windows Communication
  • Windows Types
  • Resolution Size and Position
  • General Tips

Using Plugins

  • Plugins overview
  • Plug-in Implementation
  • Write your own plugin
  • Sample plugin
  • Simple I/O plugin
  • TeamSpeak plugin
  • Downloader plugin
  • Process Manager plugin

Using Events

  • JavaScript events overview
  • Using game events in your app
  • Game events Simulator
  • Verifying event status

Developers Console

  • Submit a new version
  • Submit for review
  • Update store listing
  • Manage your subscriptions
  • Users and permissions
  • Crash reports
  • Rating and reviews

Integrations

  • Integrating app analytics
  • Login with Twitch
  • Login with Overwolf
  • Event SDK for Game Devs
  • Twitch Extensions

Request a Service

  • Marketing asset requirements
  • Looking for Group
  • Promoting your app

Community Help

  • Join the Community
  • Webinars
  • Developers Content
  • Code snippets

Legal

  • Legal overview
  • App terms
  • Developers terms
Edit

Twitch Extensions and game events

Overview

Twitch enables developers to build extensions, interactive web apps that run in the broadcaster’s channel and provide added value. The extension’s front-end runs in an iframe, and extensions can communicate with a Backend Service (EBS). To learn more about Twitch extensions visit https://dev.twitch.tv/docs/extensions/ .

Overwolf’s Twitch Game Events allows a Twitch extension to receive game events that occur in a specific broadcaster's streaming session for supported games.

The streamer must run Overwolf’s Twitch Game Events app while playing and log-in to Twitch from the app. The app will relay in-game events to an Overwolf’s PubSub server, creating a “room” identified by the streamer’s twitch id. These are the same events received from Overwolf’s Game Events Provider (overwolf.games.events). For more information about Game Events visit here.

Use Twitch's Backend solution (EBS) to connect to the PubSub server and subscribe to the same generated “room” in order to receive the events related to the streamer's game.

Sample App

  • Sample code for Twitch extensions game events backend services.

Preconditions

  • The streamer must run the Twitch game events app while in game and log in to Twitch from the app.
  • In order to connect to the Overwolf’s events PubSub, extension developers must obtain a client id and choose a secret that will be used for authentication for the PubSub.

Connecting to the PubSub

The PubSub address is https://twitchge.overwolf.com.

Authenticating

POST /auth/backend

Providing the credentials obtained from Overwolf:

{
 broadcaster: OUR_STREAMER_ID, //the Twitch channel ID that you get from the Twitch API
 client_key: CLIENT_KEY,
 client_secret: CLIENT_SECRET
}

If authentication is successful the response will contain a JSON with a token property. This token should be used to connect to the PubSub socket and as a token for authorization from other game event Pubsub endpoints.

Special Endpoints

The PubSub server has 3 special endpoints that can be used to retrieve game state information. These endpoints must be called with Authorization: Bearer token header providing the token obtained from the /auth/backend call.

Get Streamer Game

GET /info/:streamer_id/game

This will return the streamer's currently played game id.

Get Game Info

GET /info/:streamer_id

This will return a summary of events/updates which happened in the streamer’s game. This corresponds to the getInfo() method for Game Events.

Get Streamer Connected

GET /info/:streamer_id/connected

This checks whether the streamer is logged in and connected to the Twitch Game Extension service:

{ "connected": true/false }

Notes

  • Call GET /info/{streamerId} when the EBS connects to Overwolf’s Pubsub and when a publish event with ["sessionStart"] data is received.

    There are two scenarios in which your EBS connects to the Overwolf’s Twitch Extensions PubSub server: Before the streamer starts playing, or after.

    If your EBS connected after the streamer started playing, there is probably already information about the game currently being played. You should call the streamer info endpoint to retrieve the current information and listen to the PubSub socket for new game events and updates.

    If your EBS connected before the streamer started playing, events will be sent via the PubSub socket events. However, the streamer’s Game Events App may start when there is already some information accumulated by Overwolf’s Game Events Provider. In that case the streamer’s app will post the available information and it will be available for the EBS via the streamer info endpoint.

    This information will not be sent over the PubSub socket and instead a “publish” event with [“sessionStart”] payload will be sent. This will mark to the EBS that a new information set is available for retrieval.

  • When the information includes { UPDATING: true }, it means that the info for the broadcaster is being written with new data and you should probably retry the call. You should retry until you have a non-UPDATING state, but avoid spamming - use exponentially longer wait times between attempts or limit the number of calls per second.

Last updated on 2020-3-1 by eransharv
← Event SDK for Game DevsMarketing asset requirements →
  • Overview
  • Sample App
  • Preconditions
  • Connecting to the PubSub
  • Authenticating
  • Special Endpoints
    • Get Streamer Game
    • Get Game Info
    • Get Streamer Connected
  • Notes
  • Legal
  • Terms overview
  • Developer's terms
  • App terms
  • Overwolf terms
  • Overwolf Privacy policy
  • Support
  • Questions and Answers
  • Discord
  • Slack
  • Facebook
  • Twitter
  • Documentation
  • Changelog
  • API
  • App Creation Process
  • Best Practices
  • Game Events status
  • Information
  • Careers
  • Fund
  • Developers Blog
  • Overwolf Appstore
  • Advertise on Overwolf