-
Notifications
You must be signed in to change notification settings - Fork 2
/
openapi.yaml
23529 lines (20235 loc) · 871 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
title: Twitch API Swagger UI (Unofficial)
description: >-
Unofficial Swagger UI for Twitch API.
All endpoints are generated automatically from the [twitch docs](https://dev.twitch.tv/docs/api/reference) page.
__Features:__
* Swagger UI for all Twitch API endpoints
* Schemas for _Request Query Parameters_, _Request Body_, _Response Body_
* Some additional schemas like _Clip_, _ChatBadge_, _Prediction_, _Game_, _Channel_, _Video_ etc.
* Response codes and examples
* Generated types for TypeScript: [ts-twitch-api](https://github.com/DmitryScaletta/ts-twitch-api)
__Repository:__ [github.com/DmitryScaletta/twitch-api-swagger](https://github.com/DmitryScaletta/twitch-api-swagger)
version: helix
servers:
- url: https://api.twitch.tv/helix
description: Helix
security: []
tags:
- name: Ads
- name: Analytics
- name: Bits
- name: Channels
- name: Channel Points
- name: Charity
- name: Chat
- name: Clips
- name: Conduits
- name: CCLs
- name: Entitlements
- name: Extensions
- name: EventSub
- name: Games
- name: Goals
- name: Guest Star
- name: Hype Train
- name: Moderation
- name: Polls
- name: Predictions
- name: Raids
- name: Schedule
- name: Search
- name: Streams
- name: Subscriptions
- name: Tags
- name: Teams
- name: Users
- name: Videos
- name: Whispers
paths:
/channels/commercial:
post:
summary: Starts a commercial on the specified channel.
description: >-
Starts a commercial on the specified channel.
**NOTE**: Only partners and affiliates may run commercials and they must be streaming live at the time.
**NOTE**: Only the broadcaster may start a commercial; the broadcaster’s editors and moderators may not start commercials on behalf of the broadcaster.
__Authorization:__
Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **channel:edit:commercial** scope.
tags:
- Ads
externalDocs:
description: Start Commercial
url: https://dev.twitch.tv/docs/api/reference#start-commercial
operationId: start-commercial
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/StartCommercialBody"
examples:
Example:
value:
broadcaster_id: "41245072"
length: 60
description: This request starts a commercial.
responses:
"200":
description: Successfully started the commercial.
content:
application/json:
schema:
$ref: "#/components/schemas/StartCommercialResponse"
examples:
Example:
description: >-
_Request:_
This request starts a commercial.
```bash
curl -X POST 'https://api.twitch.tv/helix/channels/commercial' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz' \
-H 'Content-Type: application/json' \
--data-raw '{
"broadcaster_id": "41245072",
"length": 60
}'
```
value:
data:
- length: 60
message: ""
retry_after: 480
"400":
description: >-
* The _broadcaster\_id_ query parameter is required.
* The _length_ query parameter is required.
* The ID in _broadcaster\_id_ is not valid.
* To start a commercial, the broadcaster must be streaming live.
* The broadcaster may not run another commercial until the cooldown period expires. The `retry_after` field in the previous start commercial response specifies the amount of time the broadcaster must wait between running commercials.
"401":
description: >-
* The ID in `broadcaster_id` must match the user ID found in the
request’s OAuth token.
* The Authorization header is required and must contain a user access token.
* The user access token must include the **channel:edit:commercial** scope.
* The OAuth token is not valid.
* The client ID specified in the Client-Id header does not match the client ID specified in the OAuth token.
"404":
description: "* The ID in `broadcaster_id` was not found."
"429":
description: "* The broadcaster may not run another commercial until the
cooldown period expires. The `retry_after` field in the previous
start commercial response specifies the amount of time the
broadcaster must wait between running commercials."
security:
- twitch_auth:
- channel:edit:commercial
/channels/ads:
get:
summary: Returns ad schedule related information.
description: >-
This endpoint returns ad schedule related information, including snooze,
when the last ad was run, when the next ad is scheduled, and if the
channel is currently in pre-roll free time. Note that a new ad cannot be
run until 8 minutes after running a previous ad.
__Authorization:__
Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **channel:read:ads** scope. The `user_id` in the user access token must match the `broadcaster_id`.
tags:
- Ads
externalDocs:
description: Get Ad Schedule
url: https://dev.twitch.tv/docs/api/reference#get-ad-schedule
operationId: get-ad-schedule
parameters:
- name: broadcaster_id
in: query
description: Provided `broadcaster_id` must match the `user_id` in the auth token.
schema:
type: string
required: true
responses:
"200":
description: Returns the ad schedule information for the channel.
content:
application/json:
schema:
$ref: "#/components/schemas/GetAdScheduleResponse"
examples:
Example:
description: >-
_Request:_
Snooze the next ad.
```bash
curl -X GET 'https://api.twitch.tv/helix/channels/ads?broadcaster_id=123' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
```
value:
data:
- next_ad_at: 2023-08-01T23:08:18+00:00
last_ad_at: 2023-08-01T23:08:18+00:00
duration: "60"
preroll_free_time: "90"
snooze_count: "1"
snooze_refresh_at: 2023-08-01T23:08:18+00:00
"400":
description: The broadcaster ID is not valid.
"500":
description: ""
security:
- twitch_auth:
- channel:read:ads
/channels/ads/schedule/snooze:
post:
summary: Pushes back the timestamp of the upcoming automatic mid-roll ad by 5
minutes.
description: >-
If available, pushes back the timestamp of the upcoming automatic
mid-roll ad by 5 minutes. This endpoint duplicates the snooze
functionality in the creator dashboard’s Ads Manager.
__Authorization:__
Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **channel:manage:ads** scope. The `user_id` in the user access token must match the `broadcaster_id`.
tags:
- Ads
externalDocs:
description: Snooze Next Ad
url: https://dev.twitch.tv/docs/api/reference#snooze-next-ad
operationId: snooze-next-ad
parameters:
- name: broadcaster_id
in: query
description: Provided `broadcaster_id` must match the `user_id` in the auth token.
schema:
type: string
required: true
responses:
"200":
description: User’s next ad is successfully snoozed. Their _snooze\_count_ is
decremented and _snooze\_refresh\_time_ and _next\_ad\_at_ are both
updated.
content:
application/json:
schema:
$ref: "#/components/schemas/SnoozeNextAdResponse"
examples:
Example:
description: >-
_Request:_
Snooze the next ad.
```bash
curl -X POST 'https://api.twitch.tv/helix/channels/ads/schedule/snooze?broadcaster_id=123' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
```
value:
data:
- snooze_count: "1"
snooze_refresh_at: 2023-08-01T23:08:18+00:00
next_ad_at: 2023-08-01T23:08:18+00:00
"400":
description: |-
* The channel is not currently live.
* The broadcaster ID is not valid.
* Channel does not have an upcoming scheduled ad break.
"429":
description: Channel has no snoozes left.
"500":
description: ""
security:
- twitch_auth:
- channel:manage:ads
/analytics/extensions:
get:
summary: Gets an analytics report for one or more extensions.
description: >-
Gets an analytics report for one or more extensions. The response
contains the URLs used to download the reports (CSV files). [Learn
More](https://dev.twitch.tv/docs/insights)
__Authorization:__
Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **analytics:read:extensions** scope.
tags:
- Analytics
externalDocs:
description: Get Extension Analytics
url: https://dev.twitch.tv/docs/api/reference#get-extension-analytics
operationId: get-extension-analytics
parameters:
- name: extension_id
in: query
description: The extension's client ID. If specified, the response contains a
report for the specified extension. If not specified, the response
includes a report for each extension that the authenticated user
owns.
schema:
type: string
- name: type
in: query
description: |-
The type of analytics report to get. Possible values are:
* overview\_v2
schema:
type: string
enum:
- overview_v2
- name: started_at
in: query
description: >-
The reporting window's start date, in RFC3339 format. Set the time
portion to zeroes (for example, 2021-10-22T00:00:00Z).
The start date must be on or after January 31, 2018\. If you specify an earlier date, the API ignores it and uses January 31, 2018\. If you specify a start date, you must specify an end date. If you don't specify a start and end date, the report includes all available data since January 31, 2018.
The report contains one row of data for each day in the reporting window.
schema:
type: string
format: date-time
- name: ended_at
in: query
description: >-
The reporting window's end date, in RFC3339 format. Set the time
portion to zeroes (for example, 2021-10-27T00:00:00Z). The report is
inclusive of the end date.
Specify an end date only if you provide a start date. Because it can take up to two days for the data to be available, you must specify an end date that's earlier than today minus one to two days. If not, the API ignores your end date and uses an end date that is today minus one to two days.
schema:
type: string
format: date-time
- name: first
in: query
description: >-
The maximum number of report URLs to return per page in the
response. The minimum page size is 1 URL per page and the maximum is
100 URLs per page. The default is 20.
**NOTE**: While you may specify a maximum value of 100, the response will contain at most 20 URLs per page.
schema:
type: integer
format: int32
- name: after
in: query
description: >-
The cursor used to get the next page of results. The **Pagination**
object in the response contains the cursor’s value. [Read
More](https://dev.twitch.tv/docs/api/guide#pagination)
This parameter is ignored if the _extension\_id_ parameter is set.
schema:
type: string
responses:
"200":
description: Successfully retrieved the broadcaster's analytics reports.
content:
application/json:
schema:
$ref: "#/components/schemas/GetExtensionAnalyticsResponse"
examples:
Example:
description: >-
_Request:_
Gets the URLs for all reports for all extensions of the authenticated client. The request was issued on June 1, 2018.
```bash
curl -X GET 'https://api.twitch.tv/helix/analytics/extensions' \
-H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' \
-H 'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'
```
value:
data:
- extension_id: efgh
URL: https://twitch-piper-reports.s3-us-west-2.amazonaws.com/dynamic/LoL%20ADC...
type: overview_v2
date_range:
started_at: 2018-03-01T00:00:00Z
ended_at: 2018-06-01T00:00:00Z
pagination:
cursor: eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6NX19
"400":
description: >-
* The start and end dates are optional but if you specify one, you
must specify the other.
* The end date must be equal to or later than the start date.
* The cursor specified in the _after_ query parameter is not valid.
* The resource supports only forward pagination (use the _after_ query parameter).
* The _first_ query parameter is outside the allowed range of values.
"401":
description: >-
* The Authorization header is required and must contain a user
access token.
* The user access token must include the **analytics:read:extensions** scope.
* The OAuth token is not valid.
* The Client-Id header is required.
* The client ID specified in the Client-Id header does not match the client ID specified in the OAuth token.
"404":
description: "* The extension specified in the _extension\\_id_ query parameter
was not found."
security:
- twitch_auth:
- analytics:read:extensions
/analytics/games:
get:
summary: Gets an analytics report for one or more games.
description: >-
Gets an analytics report for one or more games. The response contains
the URLs used to download the reports (CSV files). [Learn
more](https://dev.twitch.tv/docs/insights)
__Authorization:__
Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **analytics:read:games** scope.
tags:
- Analytics
externalDocs:
description: Get Game Analytics
url: https://dev.twitch.tv/docs/api/reference#get-game-analytics
operationId: get-game-analytics
parameters:
- name: game_id
in: query
description: The game’s client ID. If specified, the response contains a report
for the specified game. If not specified, the response includes a
report for each of the authenticated user’s games.
schema:
type: string
- name: type
in: query
description: |-
The type of analytics report to get. Possible values are:
* overview\_v2
schema:
type: string
enum:
- overview_v2
- name: started_at
in: query
description: >-
The reporting window’s start date, in RFC3339 format. Set the time
portion to zeroes (for example, 2021-10-22T00:00:00Z). If you
specify a start date, you must specify an end date.
The start date must be within one year of today’s date. If you specify an earlier date, the API ignores it and uses a date that’s one year prior to today’s date. If you don’t specify a start and end date, the report includes all available data for the last 365 days from today.
The report contains one row of data for each day in the reporting window.
schema:
type: string
format: date-time
- name: ended_at
in: query
description: >-
The reporting window’s end date, in RFC3339 format. Set the time
portion to zeroes (for example, 2021-10-22T00:00:00Z). The report is
inclusive of the end date.
Specify an end date only if you provide a start date. Because it can take up to two days for the data to be available, you must specify an end date that’s earlier than today minus one to two days. If not, the API ignores your end date and uses an end date that is today minus one to two days.
schema:
type: string
format: date-time
- name: first
in: query
description: >-
The maximum number of report URLs to return per page in the
response. The minimum page size is 1 URL per page and the maximum is
100 URLs per page. The default is 20.
**NOTE**: While you may specify a maximum value of 100, the response will contain at most 20 URLs per page.
schema:
type: integer
format: int32
- name: after
in: query
description: >-
The cursor used to get the next page of results. The **Pagination**
object in the response contains the cursor’s value. [Read
More](https://dev.twitch.tv/docs/api/guide#pagination)
This parameter is ignored if _game\_id_ parameter is set.
schema:
type: string
responses:
"200":
description: Successfully retrieved the broadcaster’s analytics reports.
content:
application/json:
schema:
$ref: "#/components/schemas/GetGameAnalyticsResponse"
examples:
Example 1:
description: >-
_Request:_
Gets the URL for a downloadable CSV report for game ID 493057, covering the period January 1, 2018 through March 1, 2018.
```bash
curl -X GET 'https://api.twitch.tv/helix/analytics/games?game_id=493057&started_at=2018-01-01T00:00:00Z&ended_at=2018-03-01T00:00:00Z' \
-H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' \
-H 'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'
```
value:
data:
- game_id: "493057"
URL: https://twitch-piper-reports.s3-us-west-2.amazonaws.com/games/66170/overview/15183...
type: overview_v2
date_range:
started_at: 2018-01-01T00:00:00Z
ended_at: 2018-03-01T00:00:00Z
Example 2:
description: >-
_Request:_
Gets the first 5 URLs for all reports for all games of the authenticated client. The request was issued on June 14, 2018.
```bash
curl -X GET 'https://api.twitch.tv/helix/analytics/games?first=5' \
-H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' \
-H 'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'
```
value:
data:
- game_id: "9821"
URL: https://twitch-piper-reports.s3-us-west-2.amazonaws.com/games/9821/overview/152642...
type: overview_v2
date_range:
started_at: 2018-03-13T00:00:00Z
ended_at: 2018-06-13T00:00:00Z
pagination:
cursor: eyJiIjpudWxsLJxhIjoiIn0gf5
"400":
description: >-
* The start and end dates are optional but if you specify one, you
must specify the other.
* The end date must be equal to or later than the start date.
* The cursor specified in the _after_ query parameter is not valid.
* The resource supports only forward pagination (use the _after_ query parameter).
* The _first_ query parameter is outside the allowed range of values.
"401":
description: >-
* The Authorization header is required and must contain a user
access token.
* The user access token must include the **analytics:read:games** scope.
* The OAuth token is not valid.
* The Client-Id header is required.
* The client ID specified in the Client-Id header does not match the client ID specified in the OAuth token.
"404":
description: "* The game specified in the _game\\_id_ query parameter was not
found."
security:
- twitch_auth:
- analytics:read:games
/bits/leaderboard:
get:
summary: Gets the Bits leaderboard for the authenticated broadcaster.
description: >-
Gets the Bits leaderboard for the authenticated broadcaster.
__Authorization:__
Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **bits:read** scope.
tags:
- Bits
externalDocs:
description: Get Bits Leaderboard
url: https://dev.twitch.tv/docs/api/reference#get-bits-leaderboard
operationId: get-bits-leaderboard
parameters:
- name: count
in: query
description: The number of results to return. The minimum count is 1 and the
maximum is 100\. The default is 10.
schema:
type: integer
format: int32
- name: period
in: query
description: >-
The time period over which data is aggregated (uses the PST time
zone). Possible values are:
* day — A day spans from 00:00:00 on the day specified in _started\_at_ and runs through 00:00:00 of the next day.
* week — A week spans from 00:00:00 on the Monday of the week specified in _started\_at_ and runs through 00:00:00 of the next Monday.
* month — A month spans from 00:00:00 on the first day of the month specified in _started\_at_ and runs through 00:00:00 of the first day of the next month.
* year — A year spans from 00:00:00 on the first day of the year specified in _started\_at_ and runs through 00:00:00 of the first day of the next year.
* all — Default. The lifetime of the broadcaster's channel.
schema:
type: string
enum:
- day
- week
- month
- year
- all
- name: started_at
in: query
description: >-
The start date, in RFC3339 format, used for determining the
aggregation period. Specify this parameter only if you specify the
_period_ query parameter. The start date is ignored if _period_ is
all.
Note that the date is converted to PST before being used, so if you set the start time to `2022-01-01T00:00:00.0Z` and _period_ to month, the actual reporting period is December 2021, not January 2022\. If you want the reporting period to be January 2022, you must set the start time to `2022-01-01T08:00:00.0Z` or `2022-01-01T00:00:00.0-08:00`.
If your start date uses the ‘+’ offset operator (for example, `2022-01-01T00:00:00.0+05:00`), you must URL encode the start date.
schema:
type: string
format: date-time
- name: user_id
in: query
description: An ID that identifies a user that cheered bits in the channel. If
_count_ is greater than 1, the response may include users ranked
above and below the specified user. To get the leaderboard’s top
leaders, don’t specify a user ID.
schema:
type: string
responses:
"200":
description: Successfully retrieved the broadcaster’s Bits leaderboard.
content:
application/json:
schema:
$ref: "#/components/schemas/GetBitsLeaderboardResponse"
examples:
Example:
description: >-
_Request:_
Gets information about the authenticated broadcaster’s top two Bits leaderboard entries for the specified week.
```bash
curl -X GET 'https://api.twitch.tv/helix/bits/leaderboard?count=2&period=week&started_at=2018-02-05T08%3A00%3A00Z' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'
```
value:
data:
- user_id: "158010205"
user_login: tundracowboy
user_name: TundraCowboy
rank: 1
score: 12543
- user_id: "7168163"
user_login: topramens
user_name: Topramens
rank: 2
score: 6900
date_range:
started_at: 2018-02-05T08:00:00Z
ended_at: 2018-02-12T08:00:00Z
total: 2
"400":
description: >-
* The time period specified in the _period_ query parameter is not
valid.
* The _started\_at_ query parameter is required if _period_ is not set to _all_.
* The value in the _count_ query parameter is outside the range of allowed values.
"401":
description: >-
* The Authorization header is required and must specify a user
access token.
* The user access token must include the the **bits:read** scope.
* The access token is not valid.
* The ID in the Client-Id header must match the client ID in the access token.
"403":
description: ""
security:
- twitch_auth:
- bits:read
/bits/cheermotes:
get:
summary: Gets a list of Cheermotes that users can use to cheer Bits.
description: >-
Gets a list of Cheermotes that users can use to cheer Bits in any
Bits-enabled channel’s chat room. Cheermotes are animated emotes that
viewers can assign Bits to.
__Authorization:__
Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens).
tags:
- Bits
externalDocs:
description: Get Cheermotes
url: https://dev.twitch.tv/docs/api/reference#get-cheermotes
operationId: get-cheermotes
parameters:
- name: broadcaster_id
in: query
description: >-
The ID of the broadcaster whose custom Cheermotes you want to get.
Specify the broadcaster’s ID if you want to include the
broadcaster’s Cheermotes in the response (not all broadcasters
upload Cheermotes). If not specified, the response contains only
global Cheermotes.
If the broadcaster uploaded Cheermotes, the `type` field in the response is set to **channel\_custom**.
schema:
type: string
responses:
"200":
description: Successfully retrieved the Cheermotes.
content:
application/json:
schema:
$ref: "#/components/schemas/GetCheermotesResponse"
examples:
Example:
description: >-
_Request:_
Gets a list of all global Cheermotes.
```bash
curl -X GET 'https://api.twitch.tv/helix/bits/cheermotes' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
```
Gets a list of all global Cheermotes and any Cheermotes that the broadcaster has uploaded.
```bash
curl -X GET 'https://api.twitch.tv/helix/bits/cheermotes?broadcaster_id=41245072' \
-H 'Authorization: Bearer 2gbdx6oar67tqtcmt49t3wpcgycthx' \
-H 'Client-Id: wbmytr93xzw8zbg0p1izqyzzc5mbiz'
```
value:
data:
- prefix: Cheer
tiers:
- min_bits: 1
id: "1"
color: "#979797"
images:
dark:
animated:
"1": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/1.gif
"2": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/2.gif
"3": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/3.gif
"4": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/4.gif
"1.5": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/animated/1/1.5.gif
static:
"1": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/1.png
"2": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/2.png
"3": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/3.png
"4": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/4.png
"1.5": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/dark/static/1/1.5.png
light:
animated:
"1": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/1.gif
"2": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/2.gif
"3": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/3.gif
"4": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/4.gif
"1.5": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/animated/1/1.5.gif
static:
"1": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/1.png
"2": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/2.png
"3": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/3.png
"4": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/4.png
"1.5": https://d3aqoihi2n8ty8.cloudfront.net/actions/cheer/light/static/1/1.5.png
can_cheer: true
show_in_bits_card: true
type: global_first_party
order: 1
last_updated: 2018-05-22T00:06:04Z
is_charitable: false
"401":
description: >-
* The Authorization header is required and must specify an app
access token or user access token.
* The ID in the Client-Id header must match the Client ID in the OAuth token.
security:
- twitch_auth: []
/extensions/transactions:
get:
summary: Gets an extension’s list of transactions.
description: >-
Gets an extension’s list of transactions. A transaction records the
exchange of a currency (for example, Bits) for a digital product.
__Authorization:__
Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
tags:
- Bits
externalDocs:
description: Get Extension Transactions
url: https://dev.twitch.tv/docs/api/reference#get-extension-transactions
operationId: get-extension-transactions
parameters:
- name: extension_id
in: query
description: The ID of the extension whose list of transactions you want to get.
schema:
type: string
required: true
- name: id
in: query
description: A transaction ID used to filter the list of transactions. Specify
this parameter for each transaction you want to get. For example,
`id=1234&id=5678`. You may specify a maximum of 100 IDs.
schema:
type: array
items:
type: string
explode: true
- name: first
in: query
description: The maximum number of items to return per page in the response. The
minimum page size is 1 item per page and the maximum is 100 items
per page. The default is 20.
schema:
type: integer
format: int32
- name: after
in: query
description: The cursor used to get the next page of results. The **Pagination**
object in the response contains the cursor’s value. [Read
More](https://dev.twitch.tv/docs/api/guide#pagination)
schema:
type: string
responses:
"200":
description: Successfully retrieved the list of transactions.
content:
application/json:
schema:
$ref: "#/components/schemas/GetExtensionTransactionsResponse"
examples:
Example:
description: >-
_Request:_
```bash
curl -X GET
'https://api.twitch.tv/helix/extensions/transactions?extension_id=1234' \
-H 'Authorization: Bearer cfabdegwdoklmawdzdo98xt2fo512y' \
-H 'Client-Id: uo6dggojyb8d6soh92zknwmi5ej1q2'
```
value:
data:
- id: 74c52265-e214-48a6-91b9-23b6014e8041
timestamp: 2019-01-28T04:15:53.325Z
broadcaster_id: "439964613"
broadcaster_login: chikuseuma
broadcaster_name: chikuseuma
user_id: "424596340"
user_login: quotrok
user_name: quotrok
product_type: BITS_IN_EXTENSION
product_data:
domain: twitch.ext.uo6dggojyb8d6soh92zknwmi5ej1q2
sku: testSku100
cost:
amount: 100
type: bits
inDevelopment: false
displayName: Test Product 100
expiration: ""
broadcast: false
- id: 8d303dc6-a460-4945-9f48-59c31d6735cb
timestamp: 2019-01-18T09:10:13.397Z
broadcaster_id: "439964613"
broadcaster_login: chikuseuma
broadcaster_name: chikuseuma
user_id: "439966926"
user_login: liscuit
user_name: liscuit
product_type: BITS_IN_EXTENSION
product_data:
domain: twitch.ext.uo6dggojyb8d6soh92zknwmi5ej1q2
sku: testSku200
cost:
amount: 200
type: bits
inDevelopment: false
displayName: Test Product 200
expiration: ""
broadcast: false
pagination:
cursor: cursorString
"400":
description: |-
* The _extension\_id_ query parameter is required.
* The request specified too many _id_ query parameters.
* The pagination cursor is not valid.
"401":
description: >-
* The Authorization header is required and must specify an app