SlideShare a Scribd company logo
Developer Infrastructure Team: API & Identity
surviv.io fan
J.N Vollmer

Director of Engineering
Responding to Feedback:
What’s New in the Twitch API
TwitchCon 2018 San Jose, California
What’s the New
Twitch API Again?
REST APIs
Webhooks
Identity
TwitchCon 2018 San Jose, California
Top consumers are Extensions and
streamer tools
778%
Growth in usage
Yr-on-Yr
83%
Of the new API traffic
Is Extensions
99.995%
API Uptime
Key Facts About the
New Twitch API in 2018
99.949%
Webhooks Uptime
TwitchCon 2018 San Jose, California
-Consume, create, and update
relevant Twitch-related data
-Build engaging experiences for
Twitch streamers and viewers
-Consistent design across endpoints
-Bulk capabilities where applicable
-Transparent
#1.
/helix REST APIs
WHAT IS THE NEW TWITCH API?
4 Tenets of the New Twitch API
Reliability
Consistency
Simplicity
Transparency
TwitchCon 2018 San Jose, California
- Stream markers
- Game analytics
- Extension Analytics
- Bits leaderboard
- Clips
- User Extensions
Made for
Tools Dev
Games Dev
Extensions Dev
#1.
/helix REST APIs
WHAT’S NEW IN 2018
TwitchCon 2018 San Jose, California
What’s a webhook?
- Stop calling us, we’ll call you
- A Reverse API: a web callback or http push
API
How is this related to standard REST APIs?
- Consistent data schema: identical to
the /helix corresponding APIs
- Built on W3C Websub standard
#2.
Webhooks Benefits
Real-time Events
Cost Savings
No More Polling
WHAT IS THE NEW TWITCH API?
TwitchCon 2018 San Jose, California
new follower?
Your App
Server
Nope
new follower?
Nope
new follower?
Nope
new follower?
You have a new
follower
Twitch
REST Polling
#2 

Webhooks
WHAT’S THE NEW TWITCH API?
TwitchCon 2018 San Jose, California
#2 

Webhooks
WHAT’S THE NEW TWITCH API?
Subscribe to
new followers
Server
Ok
Confirm
subscription?
Ok
new follower
Webhook Flows
new follower
new follower
Twitch
TwitchCon 2018 San Jose, California
- Stream Changed (initially stream
Up/Down)
- User Changed
- Game Analytics
- Extension Analytics
- Webhooks Subscription
Management API
WHAT’S NEW IN 2018?
#2.
Webhooks
TwitchCon 2018 San Jose, California
- Who can access what resources,
with what permissions
- In the API context, our solution for
authenticating and authorizing API
calls
- OAuth 2 Standard
#3.
Identity
WHAT IS THE NEW TWITCH API?
TwitchCon 2018 San Jose, California
- Many behind-the-scenes security
and performance improvements
- Revamped app authorization screen
Benefits:
- Security
- Performance
- Security!
#3.
Identity
WHAT’S NEW IN 2018?
TwitchCon 2018 San Jose, California
- Quick and frictionless onboarding:
build a new test integration from
scratch in minutes
- Limits on what each integration can
do by default
• For the greater good of the
developer community
• To protect users’ private data
- Protection and support to enable
high-traffic integrations
Overall
WHAT’S THE NEW TWITCH API?
TwitchCon 2018 San Jose, California
What Do You
(Twitch API Developers)
Want?
Your feedback and what we’re
doing about it
TwitchCon 2018 San Jose, California
“We’ve had three big ideas […]
that we’ve stuck with for 18 years,
and they’re the reason we’re
successful: Put the customer first.
Invent. And be patient.”
TwitchCon 2018 San Jose, California
“We’ve had three big ideas […]
that we’ve stuck with for 18
years, and they’re the reason
we’re successful: Put the
customer first. Invent. And be
patient.”
TwitchCon 2018 San Jose, California
Collect Feedback
Identify
Challenges
Trade Offs &
Solutions
Design
Philosophy
Steering
Committee
How Twitch API

Puts the
Customer First
TwitchCon 2018 San Jose, California
You want to get relevant data in as few
calls as possible.
- userID field in API responses is generally
“not useful enough”
- API is too chatty
- Worse for webhooks: a push should not
need subsequent pulls
- “90% of our calls to the new Twitch API
are to translate userIDs to userNames.”
Data
Fragmentation
PROBLEM #1
TwitchCon 2018 San Jose, California
Instead of just returning the userID to
represent a user in API responses and
webhooks, we are adding the
userName
A more pragmatic and flexible approach
Denormalization
of Key Field
SOLUTION #1
BEFORE: A USER == { USERID }
AFTER: A USER == { USERID, USERNAME }
Lower the number of calls
TwitchCon 2018 San Jose, California
Restrictive
Rate Limiting
PROBLEM #2
- Existing rate limiting mechanism is
client-ID based
- Good intention: protect everyone and
enable scaling
BUT:
- Prevents your app from being popular
- Large spike in viewership will bring the
number of calls over the limit and make
an app unusable
- Compounded by problem #1 (need for
additional API requests)
TwitchCon 2018 San Jose, California
Token bucket algorithm: burst
friendly by design
Variable point value per endpoint
Supports continous growth and burst
Smart Rate
Limiting
SOLUTION #2
Your limit varies with user generated traffic
Based on:
- clientID+userID for calls that provide an
OAuth token
- IP for calls otherwise
TwitchCon 2018 San Jose, California
Subscriptions API
Endpoint
PROBLEM #1
- Exists in the legacy v5 API
BUT:
- Unreliable; some fields are inconsistent
- Suboptimal design; legacy API is too
permissive
TwitchCon 2018 San Jose, California
New Subscriptions
API Endpoint
SOLUTION #3
Enables two use cases:
- Get list of subscribers for a channel
- Confirm whether a viewer is
subscribed to a given channel
BONUS:
-Webhook
BENEFITS
- Safer
- Consistent
- Real-time data push
TwitchCon 2018 San Jose, California
What Can You
Build?
A few ideas…
TwitchCon 2018 San Jose, California
Use Case:
Stream Markers
ELGATO STREAM DECK
Announcement: https://discuss.dev.twitch.tv/t/introducing-the-stream-markers-api/
- Programmable keypad with 15 LCD
- Specifically built for streamers; very
popular
- First product of its kind that replaces
random keybindings
Stream Markers API enables a
“marker button”
TwitchCon 2018 San Jose, California
Use Case:
Stream Markers
TwitchCon 2018 San Jose, California
“The Create Stream Marker API is
perfect for our use case.
I quickly implemented it in Stream Deck
and this works great: […] the Stream
Marker automagically appears in Twitch.
- Alexandre Colucci, Tech Lead @elgato
TwitchCon 2018 San Jose, California
“New Follower”
Webhook
STREAMLABS WIDGETS
- Push real-time on screen
notifications to viewers when a
streamer gets a new follower
- Leads to streamer and viewer
excitement and engagement with
viewers
- Before webhooks, the use case could
only be accomplished with polling,
with delays
TwitchCon 2018 San Jose, California
STREAMLABS
“New follower”
webhook
TwitchCon 2018 San Jose, California
How Do I
Get Started?
A quick tutorial/refresher…
TwitchCon 2018 San Jose, California
Sign into Twitch
Dev Site
GETTING STARTED
HTTP://DEV.TWITCH.TV
TwitchCon 2018 San Jose, California
Create an Extension
or App
GETTING STARTED
- Apps are a simple basic
construct to make API calls
- Extensions are more
sophisticated, but based on the
same core concepts. Use the
Extensions Dev Rig on Github!
- You will receive a client ID and a
client Secret
- Pass the Client-ID in a header
- Get the data
Pros:
- Simple
Cons:
- Low rate limit
Call an
‘Anonymous’
Endpoint
BASIC USE CASE
TwitchCon 2018 San Jose, California
Create and Use a
Bearer Token
REGULAR USE CASE
- Three types of tokens
- Three types of flows
https://dev.twitch.tv/docs/
authentication/#getting-tokens
- Simplest combination: OAuth user
access token with implicit grant
- Request only the scopes you need
TwitchCon 2018 San Jose, California
OAuth 2 Implicit
Grant Flow
Your App
(Client)
Twitch Server
Authorization
Endpoint
(id.twitch.tv)
#1
Authentication/
Authorization
Request
Twitch User
#2
Auth Request
Twitch Server
Authorization
Endpoint
(id.twitch.tv)
#3
Auth Granted
Your App
(Client)
#4
Access Token
OAuth user access token with
implicit grant Simple
How to Create a
Bearer Token
curl -X GET 'https://id.twitch.tv/oauth2/authorize?
response_type=token&client_id=uo6dggojyb8d6soh92zknwmi
ej1q2&redirect_uri=http://
localhost&scope=viewing_activity_read&state=c3ab8aa609
a11e793ae92361f002671'
//Redirects to”:
https://
localhost#access_token=0123456789abcdefghijABCDEFGHIJ
&scope=viewing_activity_read
&state=c3ab8aa609ea11e793ae92361f002671
&token_type=bearer
1

2

3

4

5

6

7

8

9

1
0

1
1

How to Create a Bearer Token
Calling the Users API to Retrieve Details of a Given User
curl -H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' 
-X GET 'https://api.twitch.tv/helix/users?id=44322889'
{
"data": [{
"id": "44322889",
"login": "dallas",
"display_name": "dallas",
"type": "staff",
"broadcaster_type": "",
"description": "Just a gamer playing games and chatting. :)",
"profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/d.png",
"offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/d.png",
"view_count": 191836881,
"email": "login@provider.com"
}]
}
1

2

3

4

5

6

7

8

9

10

11

12
13
14
15
16
17
18
That’s it!
You are ready to roll
Questions?
See you on https://dev.twitch.tv
Thank you!

More Related Content

What's hot

apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...
apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...
apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...
apidays
 
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays
 
Building Extensions With You
Building Extensions With YouBuilding Extensions With You
Building Extensions With You
Twitch Developers
 
#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing
#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing
#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing
Agile Testing Alliance
 
History and Future of the Netflix API - Mashery Evolution of Distribution
History and Future of the Netflix API - Mashery Evolution of DistributionHistory and Future of the Netflix API - Mashery Evolution of Distribution
History and Future of the Netflix API - Mashery Evolution of Distribution
Daniel Jacobson
 
Business Impact (Nordic APIS April 2014)
Business Impact (Nordic APIS April 2014)Business Impact (Nordic APIS April 2014)
Business Impact (Nordic APIS April 2014)
Nordic APIs
 
API Strategy Introduction
API Strategy IntroductionAPI Strategy Introduction
API Strategy Introduction
Doug Gregory
 
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
CA API Management
 
#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...
#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...
#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...
Agile Testing Alliance
 
OAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST ServicesOAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST Services
Intuit Developer
 
State of the API: Insights Into the Future of APIs
State of the API: Insights Into the Future of APIsState of the API: Insights Into the Future of APIs
State of the API: Insights Into the Future of APIs
Postman
 
Twitch for Game Developers
Twitch for Game DevelopersTwitch for Game Developers
Twitch for Game Developers
Twitch Developers
 
The Swisscom APi journey
The Swisscom APi journeyThe Swisscom APi journey
The Swisscom APi journey
Kay Lummitsch - Digital Journeyman
 
Api architectures for the modern enterprise
Api architectures for the modern enterpriseApi architectures for the modern enterprise
Api architectures for the modern enterprise
CA API Management
 
Adapt or Die Sydney - API Security
Adapt or Die Sydney - API SecurityAdapt or Die Sydney - API Security
Adapt or Die Sydney - API Security
Apigee | Google Cloud
 
Enabling the Multi-Device Universe
Enabling the Multi-Device UniverseEnabling the Multi-Device Universe
Enabling the Multi-Device Universe
CA API Management
 
Hello SMS!
Hello SMS!Hello SMS!
Hello SMS!
George Abraham
 
Twitch Extensions 101
Twitch Extensions 101Twitch Extensions 101
Twitch Extensions 101
Twitch Developers
 
We Built This City - Apigee Edge Architecture
We Built This City - Apigee Edge ArchitectureWe Built This City - Apigee Edge Architecture
We Built This City - Apigee Edge Architecture
Apigee | Google Cloud
 
Common Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using PostmanCommon Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using Postman
Postman
 

What's hot (20)

apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...
apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...
apidays LIVE LONDON - Architecting Scalable Software Platforms for IoT Applic...
 
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
 
Building Extensions With You
Building Extensions With YouBuilding Extensions With You
Building Extensions With You
 
#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing
#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing
#ATAGTR2020 Presentation - Redefining DevOps for seamless performance testing
 
History and Future of the Netflix API - Mashery Evolution of Distribution
History and Future of the Netflix API - Mashery Evolution of DistributionHistory and Future of the Netflix API - Mashery Evolution of Distribution
History and Future of the Netflix API - Mashery Evolution of Distribution
 
Business Impact (Nordic APIS April 2014)
Business Impact (Nordic APIS April 2014)Business Impact (Nordic APIS April 2014)
Business Impact (Nordic APIS April 2014)
 
API Strategy Introduction
API Strategy IntroductionAPI Strategy Introduction
API Strategy Introduction
 
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
Drones, Phones & Pwns the Promise & Dangers of IoT APIs: Use APIs to Securely...
 
#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...
#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...
#ATAGTR2020 Presentation - The Splunk Integration for Futuristic NFT in DevOp...
 
OAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST ServicesOAuth for QuickBooks Online REST Services
OAuth for QuickBooks Online REST Services
 
State of the API: Insights Into the Future of APIs
State of the API: Insights Into the Future of APIsState of the API: Insights Into the Future of APIs
State of the API: Insights Into the Future of APIs
 
Twitch for Game Developers
Twitch for Game DevelopersTwitch for Game Developers
Twitch for Game Developers
 
The Swisscom APi journey
The Swisscom APi journeyThe Swisscom APi journey
The Swisscom APi journey
 
Api architectures for the modern enterprise
Api architectures for the modern enterpriseApi architectures for the modern enterprise
Api architectures for the modern enterprise
 
Adapt or Die Sydney - API Security
Adapt or Die Sydney - API SecurityAdapt or Die Sydney - API Security
Adapt or Die Sydney - API Security
 
Enabling the Multi-Device Universe
Enabling the Multi-Device UniverseEnabling the Multi-Device Universe
Enabling the Multi-Device Universe
 
Hello SMS!
Hello SMS!Hello SMS!
Hello SMS!
 
Twitch Extensions 101
Twitch Extensions 101Twitch Extensions 101
Twitch Extensions 101
 
We Built This City - Apigee Edge Architecture
We Built This City - Apigee Edge ArchitectureWe Built This City - Apigee Edge Architecture
We Built This City - Apigee Edge Architecture
 
Common Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using PostmanCommon Security API Issues and How to Mitigate Them Using Postman
Common Security API Issues and How to Mitigate Them Using Postman
 

Similar to Responding to Feedback: What's New in the Twitch API

APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...
APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...
APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...
apidays
 
Perth Meetup August 2021
Perth Meetup August 2021Perth Meetup August 2021
Perth Meetup August 2021
Michael Price
 
Apigee Edge Overview and Roadmap
Apigee Edge Overview and RoadmapApigee Edge Overview and Roadmap
Apigee Edge Overview and Roadmap
Apigee | Google Cloud
 
João Emilio Santos Bento da Silva - Estratégia de APIs
João Emilio Santos Bento da Silva - Estratégia de APIsJoão Emilio Santos Bento da Silva - Estratégia de APIs
João Emilio Santos Bento da Silva - Estratégia de APIs
DevCamp Campinas
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
OCTO Technology
 
Open Banking & Open Insurance
Open Banking & Open InsuranceOpen Banking & Open Insurance
Open Banking & Open Insurance
Amazon Web Services
 
Twitter API 2.0
Twitter API 2.0Twitter API 2.0
Twitter API 2.0
Alex Payne
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
Scott Triglia
 
[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything
[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything
[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything
WSO2
 
Z101666 best practices for delivering hybrid cloud capability with apis
Z101666 best practices for delivering hybrid cloud capability with apisZ101666 best practices for delivering hybrid cloud capability with apis
Z101666 best practices for delivering hybrid cloud capability with apis
Teodoro Cipresso
 
Technology Primer: Customize CA Application Performance Management With Tip...
Technology Primer: Customize CA Application Performance Management  With Tip...Technology Primer: Customize CA Application Performance Management  With Tip...
Technology Primer: Customize CA Application Performance Management With Tip...
CA Technologies
 
Growth Hacking APIs (Nordic APIs conference 2014)
Growth Hacking APIs (Nordic APIs conference 2014)Growth Hacking APIs (Nordic APIs conference 2014)
Growth Hacking APIs (Nordic APIs conference 2014)
vameyer
 
Maintaining the Front Door to Netflix
Maintaining the Front Door to NetflixMaintaining the Front Door to Netflix
Maintaining the Front Door to Netflix
Benjamin Schmaus
 
Tech Talk: Monitor the Performance of APIs Across the Application Lifecycle
Tech Talk: Monitor the Performance of APIs Across the Application LifecycleTech Talk: Monitor the Performance of APIs Across the Application Lifecycle
Tech Talk: Monitor the Performance of APIs Across the Application Lifecycle
CA Technologies
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
Akana
 
Accelerating API Development With OpenAPI and Serverless
Accelerating API Development With OpenAPI and ServerlessAccelerating API Development With OpenAPI and Serverless
Accelerating API Development With OpenAPI and Serverless
SmartBear
 
6 Best Practices that Make a Great API .pdf
6 Best Practices that Make a Great API .pdf6 Best Practices that Make a Great API .pdf
6 Best Practices that Make a Great API .pdf
Expert App Devs
 
APIs as a Product Strategy
APIs as a Product StrategyAPIs as a Product Strategy
APIs as a Product Strategy
Ravi Kumar
 
Madrid meetup #8 acm intro
Madrid meetup #8   acm introMadrid meetup #8   acm intro
Madrid meetup #8 acm intro
MarioMartinez88103
 
Under the Hood of the New Twitch API - TwitchCon Developer Day 2017
Under the Hood of the New Twitch API - TwitchCon Developer Day 2017Under the Hood of the New Twitch API - TwitchCon Developer Day 2017
Under the Hood of the New Twitch API - TwitchCon Developer Day 2017
Twitch Developers
 

Similar to Responding to Feedback: What's New in the Twitch API (20)

APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...
APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...
APIdays Singapore 2019 - Business of APIs: From Integration to Monetisation, ...
 
Perth Meetup August 2021
Perth Meetup August 2021Perth Meetup August 2021
Perth Meetup August 2021
 
Apigee Edge Overview and Roadmap
Apigee Edge Overview and RoadmapApigee Edge Overview and Roadmap
Apigee Edge Overview and Roadmap
 
João Emilio Santos Bento da Silva - Estratégia de APIs
João Emilio Santos Bento da Silva - Estratégia de APIsJoão Emilio Santos Bento da Silva - Estratégia de APIs
João Emilio Santos Bento da Silva - Estratégia de APIs
 
RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
Open Banking & Open Insurance
Open Banking & Open InsuranceOpen Banking & Open Insurance
Open Banking & Open Insurance
 
Twitter API 2.0
Twitter API 2.0Twitter API 2.0
Twitter API 2.0
 
Crystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPICrystal clear service interfaces w/ Swagger/OpenAPI
Crystal clear service interfaces w/ Swagger/OpenAPI
 
[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything
[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything
[WSO2 Summit Americas 2020] Having the Best Technology Isn’t Everything
 
Z101666 best practices for delivering hybrid cloud capability with apis
Z101666 best practices for delivering hybrid cloud capability with apisZ101666 best practices for delivering hybrid cloud capability with apis
Z101666 best practices for delivering hybrid cloud capability with apis
 
Technology Primer: Customize CA Application Performance Management With Tip...
Technology Primer: Customize CA Application Performance Management  With Tip...Technology Primer: Customize CA Application Performance Management  With Tip...
Technology Primer: Customize CA Application Performance Management With Tip...
 
Growth Hacking APIs (Nordic APIs conference 2014)
Growth Hacking APIs (Nordic APIs conference 2014)Growth Hacking APIs (Nordic APIs conference 2014)
Growth Hacking APIs (Nordic APIs conference 2014)
 
Maintaining the Front Door to Netflix
Maintaining the Front Door to NetflixMaintaining the Front Door to Netflix
Maintaining the Front Door to Netflix
 
Tech Talk: Monitor the Performance of APIs Across the Application Lifecycle
Tech Talk: Monitor the Performance of APIs Across the Application LifecycleTech Talk: Monitor the Performance of APIs Across the Application Lifecycle
Tech Talk: Monitor the Performance of APIs Across the Application Lifecycle
 
API Frenzy: API Strategy 101
API Frenzy: API Strategy 101API Frenzy: API Strategy 101
API Frenzy: API Strategy 101
 
Accelerating API Development With OpenAPI and Serverless
Accelerating API Development With OpenAPI and ServerlessAccelerating API Development With OpenAPI and Serverless
Accelerating API Development With OpenAPI and Serverless
 
6 Best Practices that Make a Great API .pdf
6 Best Practices that Make a Great API .pdf6 Best Practices that Make a Great API .pdf
6 Best Practices that Make a Great API .pdf
 
APIs as a Product Strategy
APIs as a Product StrategyAPIs as a Product Strategy
APIs as a Product Strategy
 
Madrid meetup #8 acm intro
Madrid meetup #8   acm introMadrid meetup #8   acm intro
Madrid meetup #8 acm intro
 
Under the Hood of the New Twitch API - TwitchCon Developer Day 2017
Under the Hood of the New Twitch API - TwitchCon Developer Day 2017Under the Hood of the New Twitch API - TwitchCon Developer Day 2017
Under the Hood of the New Twitch API - TwitchCon Developer Day 2017
 

More from Twitch Developers

Embracing the Hobbyist Persona
Embracing the Hobbyist PersonaEmbracing the Hobbyist Persona
Embracing the Hobbyist Persona
Twitch Developers
 
Using Insights to Build Better Products and Grow on Twitch
Using Insights to Build Better Products and Grow on TwitchUsing Insights to Build Better Products and Grow on Twitch
Using Insights to Build Better Products and Grow on Twitch
Twitch Developers
 
TwitchCon Developer Day Keynote
TwitchCon Developer Day KeynoteTwitchCon Developer Day Keynote
TwitchCon Developer Day Keynote
Twitch Developers
 
Rapid Prototyping Twitch Extensions: Five Lessons Learned
Rapid Prototyping Twitch Extensions: Five Lessons LearnedRapid Prototyping Twitch Extensions: Five Lessons Learned
Rapid Prototyping Twitch Extensions: Five Lessons Learned
Twitch Developers
 
Monetize Your Extension a Bit at a Time
Monetize Your Extension a Bit at a TimeMonetize Your Extension a Bit at a Time
Monetize Your Extension a Bit at a Time
Twitch Developers
 
Twitch Extension Review Process: The Missing Manual
Twitch Extension Review Process: The Missing ManualTwitch Extension Review Process: The Missing Manual
Twitch Extension Review Process: The Missing Manual
Twitch Developers
 
Making Your Game a Success With Twitch
Making Your Game a Success With TwitchMaking Your Game a Success With Twitch
Making Your Game a Success With Twitch
Twitch Developers
 
Extension Design Patterns for Twitch Scale
Extension Design Patterns for Twitch ScaleExtension Design Patterns for Twitch Scale
Extension Design Patterns for Twitch Scale
Twitch Developers
 
Get Your Extension Discovered
Get Your Extension DiscoveredGet Your Extension Discovered
Get Your Extension Discovered
Twitch Developers
 
Bots Bots Bots: Building Chatbots
Bots Bots Bots: Building ChatbotsBots Bots Bots: Building Chatbots
Bots Bots Bots: Building Chatbots
Twitch Developers
 
Twitch Developer Tour
Twitch Developer Tour Twitch Developer Tour
Twitch Developer Tour
Twitch Developers
 
How Streaming is Changing the Way We Play
How Streaming is Changing the Way We PlayHow Streaming is Changing the Way We Play
How Streaming is Changing the Way We Play
Twitch Developers
 
Twitch Insights: Player Research and Interaction
Twitch Insights: Player Research and InteractionTwitch Insights: Player Research and Interaction
Twitch Insights: Player Research and Interaction
Twitch Developers
 
Twitch + Games
Twitch + GamesTwitch + Games
Twitch + Games
Twitch Developers
 
Using Twitch Drops to Promote Viewer Engagement
Using Twitch Drops to Promote Viewer Engagement Using Twitch Drops to Promote Viewer Engagement
Using Twitch Drops to Promote Viewer Engagement
Twitch Developers
 
Twitch Extensions: Live Apps for Live Streams
Twitch Extensions: Live Apps for Live StreamsTwitch Extensions: Live Apps for Live Streams
Twitch Extensions: Live Apps for Live Streams
Twitch Developers
 
Making Twitch Interactive with Twitch Extensions
Making Twitch Interactive with Twitch ExtensionsMaking Twitch Interactive with Twitch Extensions
Making Twitch Interactive with Twitch Extensions
Twitch Developers
 
Improving Game Performance and Streaming with Twitch Insights
Improving Game Performance and Streaming with Twitch Insights Improving Game Performance and Streaming with Twitch Insights
Improving Game Performance and Streaming with Twitch Insights
Twitch Developers
 
Engaging Your Community with Twitch
Engaging Your Community with TwitchEngaging Your Community with Twitch
Engaging Your Community with Twitch
Twitch Developers
 
Empowering Extensions with Game APIs
Empowering Extensions with Game APIsEmpowering Extensions with Game APIs
Empowering Extensions with Game APIs
Twitch Developers
 

More from Twitch Developers (20)

Embracing the Hobbyist Persona
Embracing the Hobbyist PersonaEmbracing the Hobbyist Persona
Embracing the Hobbyist Persona
 
Using Insights to Build Better Products and Grow on Twitch
Using Insights to Build Better Products and Grow on TwitchUsing Insights to Build Better Products and Grow on Twitch
Using Insights to Build Better Products and Grow on Twitch
 
TwitchCon Developer Day Keynote
TwitchCon Developer Day KeynoteTwitchCon Developer Day Keynote
TwitchCon Developer Day Keynote
 
Rapid Prototyping Twitch Extensions: Five Lessons Learned
Rapid Prototyping Twitch Extensions: Five Lessons LearnedRapid Prototyping Twitch Extensions: Five Lessons Learned
Rapid Prototyping Twitch Extensions: Five Lessons Learned
 
Monetize Your Extension a Bit at a Time
Monetize Your Extension a Bit at a TimeMonetize Your Extension a Bit at a Time
Monetize Your Extension a Bit at a Time
 
Twitch Extension Review Process: The Missing Manual
Twitch Extension Review Process: The Missing ManualTwitch Extension Review Process: The Missing Manual
Twitch Extension Review Process: The Missing Manual
 
Making Your Game a Success With Twitch
Making Your Game a Success With TwitchMaking Your Game a Success With Twitch
Making Your Game a Success With Twitch
 
Extension Design Patterns for Twitch Scale
Extension Design Patterns for Twitch ScaleExtension Design Patterns for Twitch Scale
Extension Design Patterns for Twitch Scale
 
Get Your Extension Discovered
Get Your Extension DiscoveredGet Your Extension Discovered
Get Your Extension Discovered
 
Bots Bots Bots: Building Chatbots
Bots Bots Bots: Building ChatbotsBots Bots Bots: Building Chatbots
Bots Bots Bots: Building Chatbots
 
Twitch Developer Tour
Twitch Developer Tour Twitch Developer Tour
Twitch Developer Tour
 
How Streaming is Changing the Way We Play
How Streaming is Changing the Way We PlayHow Streaming is Changing the Way We Play
How Streaming is Changing the Way We Play
 
Twitch Insights: Player Research and Interaction
Twitch Insights: Player Research and InteractionTwitch Insights: Player Research and Interaction
Twitch Insights: Player Research and Interaction
 
Twitch + Games
Twitch + GamesTwitch + Games
Twitch + Games
 
Using Twitch Drops to Promote Viewer Engagement
Using Twitch Drops to Promote Viewer Engagement Using Twitch Drops to Promote Viewer Engagement
Using Twitch Drops to Promote Viewer Engagement
 
Twitch Extensions: Live Apps for Live Streams
Twitch Extensions: Live Apps for Live StreamsTwitch Extensions: Live Apps for Live Streams
Twitch Extensions: Live Apps for Live Streams
 
Making Twitch Interactive with Twitch Extensions
Making Twitch Interactive with Twitch ExtensionsMaking Twitch Interactive with Twitch Extensions
Making Twitch Interactive with Twitch Extensions
 
Improving Game Performance and Streaming with Twitch Insights
Improving Game Performance and Streaming with Twitch Insights Improving Game Performance and Streaming with Twitch Insights
Improving Game Performance and Streaming with Twitch Insights
 
Engaging Your Community with Twitch
Engaging Your Community with TwitchEngaging Your Community with Twitch
Engaging Your Community with Twitch
 
Empowering Extensions with Game APIs
Empowering Extensions with Game APIsEmpowering Extensions with Game APIs
Empowering Extensions with Game APIs
 

Recently uploaded

Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 

Recently uploaded (20)

Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 

Responding to Feedback: What's New in the Twitch API

  • 1. Developer Infrastructure Team: API & Identity surviv.io fan J.N Vollmer
 Director of Engineering
  • 2. Responding to Feedback: What’s New in the Twitch API
  • 3. TwitchCon 2018 San Jose, California What’s the New Twitch API Again? REST APIs Webhooks Identity
  • 4. TwitchCon 2018 San Jose, California Top consumers are Extensions and streamer tools 778% Growth in usage Yr-on-Yr 83% Of the new API traffic Is Extensions 99.995% API Uptime Key Facts About the New Twitch API in 2018 99.949% Webhooks Uptime
  • 5. TwitchCon 2018 San Jose, California -Consume, create, and update relevant Twitch-related data -Build engaging experiences for Twitch streamers and viewers -Consistent design across endpoints -Bulk capabilities where applicable -Transparent #1. /helix REST APIs WHAT IS THE NEW TWITCH API? 4 Tenets of the New Twitch API Reliability Consistency Simplicity Transparency
  • 6. TwitchCon 2018 San Jose, California - Stream markers - Game analytics - Extension Analytics - Bits leaderboard - Clips - User Extensions Made for Tools Dev Games Dev Extensions Dev #1. /helix REST APIs WHAT’S NEW IN 2018
  • 7. TwitchCon 2018 San Jose, California What’s a webhook? - Stop calling us, we’ll call you - A Reverse API: a web callback or http push API How is this related to standard REST APIs? - Consistent data schema: identical to the /helix corresponding APIs - Built on W3C Websub standard #2. Webhooks Benefits Real-time Events Cost Savings No More Polling WHAT IS THE NEW TWITCH API?
  • 8. TwitchCon 2018 San Jose, California new follower? Your App Server Nope new follower? Nope new follower? Nope new follower? You have a new follower Twitch REST Polling #2 
 Webhooks WHAT’S THE NEW TWITCH API?
  • 9. TwitchCon 2018 San Jose, California #2 
 Webhooks WHAT’S THE NEW TWITCH API? Subscribe to new followers Server Ok Confirm subscription? Ok new follower Webhook Flows new follower new follower Twitch
  • 10. TwitchCon 2018 San Jose, California - Stream Changed (initially stream Up/Down) - User Changed - Game Analytics - Extension Analytics - Webhooks Subscription Management API WHAT’S NEW IN 2018? #2. Webhooks
  • 11. TwitchCon 2018 San Jose, California - Who can access what resources, with what permissions - In the API context, our solution for authenticating and authorizing API calls - OAuth 2 Standard #3. Identity WHAT IS THE NEW TWITCH API?
  • 12. TwitchCon 2018 San Jose, California - Many behind-the-scenes security and performance improvements - Revamped app authorization screen Benefits: - Security - Performance - Security! #3. Identity WHAT’S NEW IN 2018?
  • 13. TwitchCon 2018 San Jose, California - Quick and frictionless onboarding: build a new test integration from scratch in minutes - Limits on what each integration can do by default • For the greater good of the developer community • To protect users’ private data - Protection and support to enable high-traffic integrations Overall WHAT’S THE NEW TWITCH API?
  • 14. TwitchCon 2018 San Jose, California What Do You (Twitch API Developers) Want? Your feedback and what we’re doing about it
  • 15. TwitchCon 2018 San Jose, California “We’ve had three big ideas […] that we’ve stuck with for 18 years, and they’re the reason we’re successful: Put the customer first. Invent. And be patient.”
  • 16. TwitchCon 2018 San Jose, California “We’ve had three big ideas […] that we’ve stuck with for 18 years, and they’re the reason we’re successful: Put the customer first. Invent. And be patient.”
  • 17. TwitchCon 2018 San Jose, California Collect Feedback Identify Challenges Trade Offs & Solutions Design Philosophy Steering Committee How Twitch API
 Puts the Customer First
  • 18. TwitchCon 2018 San Jose, California You want to get relevant data in as few calls as possible. - userID field in API responses is generally “not useful enough” - API is too chatty - Worse for webhooks: a push should not need subsequent pulls - “90% of our calls to the new Twitch API are to translate userIDs to userNames.” Data Fragmentation PROBLEM #1
  • 19. TwitchCon 2018 San Jose, California Instead of just returning the userID to represent a user in API responses and webhooks, we are adding the userName A more pragmatic and flexible approach Denormalization of Key Field SOLUTION #1 BEFORE: A USER == { USERID } AFTER: A USER == { USERID, USERNAME } Lower the number of calls
  • 20. TwitchCon 2018 San Jose, California Restrictive Rate Limiting PROBLEM #2 - Existing rate limiting mechanism is client-ID based - Good intention: protect everyone and enable scaling BUT: - Prevents your app from being popular - Large spike in viewership will bring the number of calls over the limit and make an app unusable - Compounded by problem #1 (need for additional API requests)
  • 21. TwitchCon 2018 San Jose, California Token bucket algorithm: burst friendly by design Variable point value per endpoint Supports continous growth and burst Smart Rate Limiting SOLUTION #2 Your limit varies with user generated traffic Based on: - clientID+userID for calls that provide an OAuth token - IP for calls otherwise
  • 22. TwitchCon 2018 San Jose, California Subscriptions API Endpoint PROBLEM #1 - Exists in the legacy v5 API BUT: - Unreliable; some fields are inconsistent - Suboptimal design; legacy API is too permissive
  • 23. TwitchCon 2018 San Jose, California New Subscriptions API Endpoint SOLUTION #3 Enables two use cases: - Get list of subscribers for a channel - Confirm whether a viewer is subscribed to a given channel BONUS: -Webhook BENEFITS - Safer - Consistent - Real-time data push
  • 24. TwitchCon 2018 San Jose, California What Can You Build? A few ideas…
  • 25. TwitchCon 2018 San Jose, California Use Case: Stream Markers ELGATO STREAM DECK Announcement: https://discuss.dev.twitch.tv/t/introducing-the-stream-markers-api/ - Programmable keypad with 15 LCD - Specifically built for streamers; very popular - First product of its kind that replaces random keybindings Stream Markers API enables a “marker button”
  • 26. TwitchCon 2018 San Jose, California Use Case: Stream Markers
  • 27. TwitchCon 2018 San Jose, California “The Create Stream Marker API is perfect for our use case. I quickly implemented it in Stream Deck and this works great: […] the Stream Marker automagically appears in Twitch. - Alexandre Colucci, Tech Lead @elgato
  • 28. TwitchCon 2018 San Jose, California “New Follower” Webhook STREAMLABS WIDGETS - Push real-time on screen notifications to viewers when a streamer gets a new follower - Leads to streamer and viewer excitement and engagement with viewers - Before webhooks, the use case could only be accomplished with polling, with delays
  • 29. TwitchCon 2018 San Jose, California STREAMLABS “New follower” webhook
  • 30. TwitchCon 2018 San Jose, California How Do I Get Started? A quick tutorial/refresher…
  • 31. TwitchCon 2018 San Jose, California Sign into Twitch Dev Site GETTING STARTED HTTP://DEV.TWITCH.TV
  • 32. TwitchCon 2018 San Jose, California Create an Extension or App GETTING STARTED - Apps are a simple basic construct to make API calls - Extensions are more sophisticated, but based on the same core concepts. Use the Extensions Dev Rig on Github! - You will receive a client ID and a client Secret
  • 33. - Pass the Client-ID in a header - Get the data Pros: - Simple Cons: - Low rate limit Call an ‘Anonymous’ Endpoint BASIC USE CASE
  • 34. TwitchCon 2018 San Jose, California Create and Use a Bearer Token REGULAR USE CASE - Three types of tokens - Three types of flows https://dev.twitch.tv/docs/ authentication/#getting-tokens - Simplest combination: OAuth user access token with implicit grant - Request only the scopes you need
  • 35. TwitchCon 2018 San Jose, California OAuth 2 Implicit Grant Flow Your App (Client) Twitch Server Authorization Endpoint (id.twitch.tv) #1 Authentication/ Authorization Request Twitch User #2 Auth Request Twitch Server Authorization Endpoint (id.twitch.tv) #3 Auth Granted Your App (Client) #4 Access Token
  • 36. OAuth user access token with implicit grant Simple How to Create a Bearer Token curl -X GET 'https://id.twitch.tv/oauth2/authorize? response_type=token&client_id=uo6dggojyb8d6soh92zknwmi ej1q2&redirect_uri=http:// localhost&scope=viewing_activity_read&state=c3ab8aa609 a11e793ae92361f002671' //Redirects to”: https:// localhost#access_token=0123456789abcdefghijABCDEFGHIJ &scope=viewing_activity_read &state=c3ab8aa609ea11e793ae92361f002671 &token_type=bearer 1
 2
 3
 4
 5
 6
 7
 8
 9
 1 0
 1 1

  • 37. How to Create a Bearer Token Calling the Users API to Retrieve Details of a Given User curl -H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' -X GET 'https://api.twitch.tv/helix/users?id=44322889' { "data": [{ "id": "44322889", "login": "dallas", "display_name": "dallas", "type": "staff", "broadcaster_type": "", "description": "Just a gamer playing games and chatting. :)", "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/d.png", "offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/d.png", "view_count": 191836881, "email": "login@provider.com" }] } 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12 13 14 15 16 17 18
  • 38. That’s it! You are ready to roll
  • 40. See you on https://dev.twitch.tv Thank you!