### Get Current Live Request Example Source: https://apiv2-doc.twitcasting.tv/ This cURL command demonstrates how to request the current live broadcast information for a specific user. Ensure you replace {ACCESS_TOKEN} with your actual token. ```bash curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_jp/current_live" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Sample Response for Supporting List Source: https://apiv2-doc.twitcasting.tv/ This is a sample JSON response for a request to get a list of users being supported. It includes the total count and an array of supporting user objects, each with detailed information. ```json { "total": 1234, "supporting": [ { "id":"182224938", "screen_id":"twitcasting_jp", "name":"ツイキャス公式", "image":"http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/613625726512705536/GLlBoXcS_normal.png", "profile":"ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは https://t.co/4gCf7XVm7N までお願いします。公式Facebookページhttps://t.co/bxYVwpzTJB\n公式Instagram\nhttps://t.co/Bm2O2J2Kfs", "level": 24, "last_movie_id":"189037369", "is_live":true, "supported":1632716873, "supporter_count": 0, "supporting_count": 0, "created": 0, "point": 15, "total_point": 300 }, { "id":"2880417757", "screen_id":"twitcasting_pr", "name":"ツイキャス運営事務局", "image":"http://202-234-44-61.moi.st/image3s/pbs.twimg.com/profile_images/740857980137050112/4sIEkzV8_normal.jpg", "profile":"モイ! ツイキャスを運営しているモイ株式会社広報担当のアカウントです。公式アカウントはこちら! @twitcasting_jp", "level": 23, "last_movie_id":"323387579", "is_live":false, "supported":1632716873, "supporter_count": 0, "supporting_count": 0, "created": 0, "point": 30, "total_point": 45 }, ... ] } ``` -------------------------------- ### Get User Info Request Source: https://apiv2-doc.twitcasting.tv/ This cURL command demonstrates how to fetch user information using the GET /users/:user_id endpoint. It requires specifying the API version and including the access token in the Authorization header. ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_jp" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Sample Response for Get User Support Status Source: https://apiv2-doc.twitcasting.tv/ This is a sample JSON response indicating the support status of a user. It includes details about whether the current user is supporting the target user and the timestamp of support. ```json { "is_supporting": true, "supported": 1632716873, "target_user": { "id": "3160885238", "screen_id": "casma_jp", "name": "キャスマ公式", "image": "http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/590410593330311169/b_mp4n9v_normal.png", "profile": "キャスマーケットの公式アカウントです。キャスマに関するサポート対応、キャスマに並んでいる商品の紹介をしています。", "level": 26, "last_movie_id": null, "is_live": false, "supporter_count": 0, "supporting_count": 0, "created": 0 } } ``` -------------------------------- ### Get Supporter List Source: https://apiv2-doc.twitcasting.tv/ Retrieves a list of users supporting a specified user. Supports pagination and sorting by ranking or recency. ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_dev/supporters?offset=10&limit=20&sort=ranking" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Get Movie Info Source: https://apiv2-doc.twitcasting.tv/ Retrieves detailed information about a specific live or recorded movie. ```APIDOC ## GET /movies/:movie_id ### Description Retrieves detailed information about a specific live or recorded movie. ### Method GET ### Endpoint /movies/:movie_id ### Parameters #### Path Parameters - **movie_id** (string) - Required - The ID of the movie to retrieve. ### Request Example ```curl curl -X GET "https://apiv2.twitcasting.tv/movies/189037369" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200) - **movie** (object) - Movie object containing details about the live/recording. - **broadcaster** (object) - Broadcaster object with user information. - **tags** (array) - Array of tags associated with the movie. #### Response Example ```json { "movie":{ "id":"189037369", "user_id":"182224938", "title":"ライブ #189037369", "subtitle": "ライブ配信中!", "last_owner_comment": "もいもい", "category": "girls_jcjk_jp", "link":"http://twitcasting.tv/twitcasting_jp/movie/189037369", "is_live":false, "is_recorded":false, "comment_count":2124, "large_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1.jpg", "small_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1-s.jpg", "country":"jp", "duration":1186, "created":1438500282, "is_collabo":false, "is_protected":false, "max_view_count":1675, "current_view_count":20848, "total_view_count":20848, "hls_url":"https://twitcasting.tv/twitcasting_jp/metastream.m3u8/?video=1" }, "broadcaster":{ "id":"182224938", "screen_id":"twitcasting_jp", "name":"ツイキャス公式", "image":"http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/613625726512705536/GLlBoXcS_normal.png", "profile":"ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは https://t.co/4gCf7XVm7N までお願いします。公式Facebookページhttps://t.co/bxYVwpzTJB\n公式Instagram\nhttps://t.co/Bm2O2J2Kfs", "level":24, "last_movie_id":"189037369", "is_live":true, "supporter_count": 0, "supporting_count": 0, "created": 0 }, "tags":["人気", "コンティニュー中", "レベル40+", "初見さん大歓迎", "まったり", "雑談"] } ``` ``` -------------------------------- ### Get User Info Source: https://apiv2-doc.twitcasting.tv/ Retrieves information about a specific user. ```APIDOC ## GET /users/:user_id ### Description Retrieves information for a specified user. ### Required Permission Read ### Limit 60 requests / 60 sec ### Method GET ### Endpoint https://apiv2.twitcasting.tv/users/:user_id ### Parameters #### Path Parameters - **user_id** (string) - Required - The user's ID or screen ID. ### Request Example ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_jp" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ``` -------------------------------- ### Get Movies by User Source: https://apiv2-doc.twitcasting.tv/ Retrieves a list of past live recordings (movies) owned by a user, ordered by creation date in descending order. ```APIDOC ## GET /users/:user_id/movies ### Description Retrieves a list of past live recordings (movies) owned by a user, ordered by creation date in descending order. ### Required Permission Read ### Limit 60 requests / 60 sec ### Method GET ### Endpoint /users/:user_id/movies ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID or screen ID of the user whose movies are to be retrieved. #### Query Parameters - **offset** (int) - Optional - The position from the start (min:0, max:1000, default:0). - **limit** (int) - Optional - The maximum number of items to retrieve (min:1, max:50, default:20). The number of returned videos may be less than specified. - **slice_id** (int) - Optional - Retrieves movies prior to this ID. If specified, offset is ignored (min:1, default:none). ### Request Example ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_jp/movies?offset=10&limit=20" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200) - **movies** (array) - An array of movie objects. - **has_more** (boolean) - Indicates if there are more movies available. #### Response Example ```json { "movies": [ { "id": "189037369", "user_id": "182224938", "title": "ライブ #189037369", "subtitle": "ライブ配信中!", "last_owner_comment": "もいもい", "category": "girls_jcjk_jp", "link": "http://twitcasting.tv/twitcasting_jp/movie/189037369", "is_live": false, "is_recorded": false, "comment_count": 2124, "large_thumbnail": "http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1.jpg", "small_thumbnail": "http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1-s.jpg", "country": "jp", "duration": 1186, "created": 1438500282, "is_collabo": false, "is_protected": false, "max_view_count": 1675, "current_view_count": 0, "total_view_count": 20848, "hls_url": "https://twitcasting.tv/twitcasting_jp/metastream.m3u8/?video=1" } ], "has_more": true } ``` ``` -------------------------------- ### Get Supporting List Request (cURL) Source: https://apiv2-doc.twitcasting.tv/ This cURL command illustrates how to retrieve a list of users that a specific user is supporting. You can specify offset and limit for pagination. Replace {ACCESS_TOKEN} with your token and 'twitcasting_dev' with the target user's ID or screen ID. ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_dev/supporting?offset=10&limit=20" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Get Categories Source: https://apiv2-doc.twitcasting.tv/ Retrieves a list of categories that have live streams. Requires 'Read' permission. Rate limit is 60 requests per 60 seconds. ```APIDOC ## GET /categories ### Description Retrieves a list of categories that have live streams. ### Method GET ### Endpoint /categories ### Parameters #### Query Parameters - **lang** (string) - Required - The language for the search. Accepted values are "ja" (Japanese) and "en" (English). ### Request Example ```curl curl -X GET "https://apiv2.twitcasting.tv/categories?lang=ja" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200) - **categories** (array) - An array of Category objects. #### Category object Represents a live streaming category. - **id** (string) - Category ID. - **name** (string) - Category name. - **sub_categories** (array) - An array of Sub category objects. #### Sub category object Represents a sub-category of a live streaming category. - **id** (string) - Sub-category ID. - **name** (string) - Sub-category name. - **count** (int) - The number of live streams in the sub-category. #### Response Example ```json { "categories":[ { "id":"_channel", "name":"チャンネル", "sub_categories":[ {"id":"_system_channel_5","name":"ミュージックch","count":100}, {"id":"_system_channel_6","name":"ママch","count":49}, {"id":"_system_channel_7","name":"アニメch","count":42} ] }, { "id":"girls_jp", "name":"女子CAS", "sub_categories":[ {"id":"girls_face_jp","name":"女子:顔出し","count":66}, {"id":"girls_jcjk_jp","name":"女子:JCJK","count":17}, {"id":"girls_ljk_jp","name":"女子:LJK","count":89} ] } ] } ``` #### Error Responses This API may return Validation Error in addition to common error responses. ``` -------------------------------- ### Application-Level API Request with Basic Auth Source: https://apiv2-doc.twitcasting.tv/ This shows how to authenticate API requests using application credentials (ClientID and ClientSecret) by Base64 encoding them and using Basic authentication. This method is not applicable for Get Live Thumbnail Image requests. ```http Authorization: Basic {BASE64_ENCODED_STRING} ``` -------------------------------- ### Realtime API - Lives Source: https://apiv2-doc.twitcasting.tv/ Get new live streams in real-time via WebSocket. Requires 'Read' permission. Limited to 5 connections per access token. ```APIDOC ## Realtime API - Lives ### Description Get new live streams in real-time via WebSocket. ### Required Permission Read ### Limit 5 connections / access token ### Request Authentication can be done by including the Access Token in the `Authentication` header or as a GET parameter `/lives?token=***`. ```javascript // You need to install ws, e.g., `npm install --save ws` const WebSocket = require('ws'); const clientID = '***'; const clientSecret = '***'; const livesSocket = new WebSocket('wss://' + clientID + ':' + clientSecret + '@realtime.twitcasting.tv/lives'); livesSocket.on('message', function incoming(data, flags) { console.log(data); }); ``` Note that the hostname is `realtime.twitcasting.tv`, which is different from other APIs. WebSocket over SSL (`wss://`) can be used. Upon connection, you will receive `{"hello":"Moi!"}`. After that, Movie data for live streams will be sent continuously. There are no connection time limits, but the server may disconnect, so clients should implement appropriate reconnection logic. ### Response Initially, `{"hello":"Moi!"}` will be received. Subsequent messages are the same as the Search Live Movies API response. #### Error Responses This API may return common error responses. ``` -------------------------------- ### User API Request with Bearer Token Source: https://apiv2-doc.twitcasting.tv/ Example of how to include the access token in the Authorization header for user-specific API calls. The token should be prefixed with 'Bearer '. ```http Authorization: Bearer {ACCESS_TOKEN} ``` -------------------------------- ### Get Categories Source: https://apiv2-doc.twitcasting.tv/ Fetches a list of currently active broadcast categories. Requires specifying the desired language for category names. ```curl curl -X GET "https://apiv2.twitcasting.tv/categories?lang=ja" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Get Comments Source: https://apiv2-doc.twitcasting.tv/ Retrieves comments for a specific live stream, ordered by creation date in descending order. Supports pagination. ```APIDOC ## GET /movies/:movie_id/comments ### Description Retrieves comments for a live stream in descending order of creation time. ### Method GET ### Endpoint /movies/:movie_id/comments ### Parameters #### Query Parameters - **offset** (int) - Optional - The starting position from the beginning. Defaults to 0. - **limit** (int) - Optional - The number of comments to retrieve. Defaults to 10. Minimum 1, Maximum 50. - **slice_id** (string) - Optional - Retrieves comments after this comment ID. If specified, offset is ignored. ### Response #### Success Response (200) - **movie_id** (string) - The live stream ID. - **all_count** (int) - The total number of comments. - **comments** (array) - An array of Comment objects. #### Comment object - **id** (string) - The comment ID. - **message** (string) - The content of the comment. - **from_user** (object) - Information about the user who posted the comment. - **created** (int) - The Unix timestamp when the comment was posted. #### Response Example ```json { "movie_id":"189037369", "all_count":2124, "comments":[ { "id":"7134775954", "message":"モイ!", "from_user":{ "id":"182224938", "screen_id":"twitcasting_jp", "name":"ツイキャス公式", "image":"http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/613625726512705536/GLlBoXcS_normal.png", "profile":"ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは https://t.co/4gCf7XVm7N までお願いします。公式Facebookページhttps://t.co/bxYVwpzTJB\n公式Instagram\nhttps://t.co/Bm2O2J2Kfs", "level":24, "last_movie_id":"189037369", "is_live":false, "supporter_count": 0, "supporting_count": 0, "created": 0 }, "created":1479579471 } // ... more comments ] } ``` ``` -------------------------------- ### Get Current Live Stream Information Source: https://apiv2-doc.twitcasting.tv/ Retrieves information about a user's current live stream if they are broadcasting. Requires 'Read' permission. ```APIDOC ## Get Current Live Retrieves information about a user's current live stream if they are broadcasting. ### Required Permission Read ### Limit 60 requests / 60 sec ### Request `GET /users/:user_id/current_live` `:user_id` can be either the user's `id` or `screen_id`. #### Request Example ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_jp/current_live" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200 OK) Returns a JSON object containing details about the live stream and the broadcaster. - **movie** (object) - Movie object with live stream details. - **broadcaster** (object) - User object with broadcaster information. - **tags** (array) - An array of tags set for the stream. #### Response Example ```json { "movie":{ "id":"189037369", "user_id":"182224938", "title":"ライブ #189037369", "subtitle": "ライブ配信中!", "last_owner_comment": "もいもい", "category": "girls_jcjk_jp", "link":"http://twitcasting.tv/twitcasting_jp/movie/189037369", "is_live":true, "is_recorded":false, "comment_count":2124, "large_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1.jpg", "small_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1-s.jpg", "country":"jp", "duration":1186, "created":1438500282, "is_collabo":false, "is_protected":false, "max_view_count":1675, "current_view_count":20848, "total_view_count":20848, "hls_url":"https://twitcasting.tv/twitcasting_jp/metastream.m3u8/?video=1" }, "broadcaster":{ "id":"182224938", "screen_id":"twitcasting_jp", "name":"ツイキャス公式", "image":"http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/613625726512705536/GLlBoXcS_normal.png", "profile":"ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは https://t.co/4gCf7XVm7N までお願いします。公式Facebookページhttps://t.co/bxYVwpzTJB\n公式Instagram\nhttps://t.co/Bm2O2J2Kfs", "level":24, "last_movie_id":"189037369", "is_live":true, "supporter_count": 0, "supporting_count": 0, "created": 0 }, "tags":["人気", "コンティニュー中", "レベル40+", "初見さん大歓迎", "まったり", "雑談"] } ``` #### Error Responses This API may return common error responses, as well as Not Found errors. ``` -------------------------------- ### Connect to Realtime Lives API via WebSocket Source: https://apiv2-doc.twitcasting.tv/ Connect to the TwitCasting Realtime Lives API using WebSockets. Ensure you have the 'ws' library installed. The host name is different from other TwitCasting APIs. ```javascript // `npm install --save ws` するなどして ws をインストールする必要があります const WebSocket = require('ws'); const clientID = '***'; const clientSecret = '***'; const livesSocket = new WebSocket('wss://' + clientID + ':' + clientSecret + '@realtime.twitcasting.tv/lives'); livesSocket.on('message', function incoming(data, flags) { console.log(data); }); ``` -------------------------------- ### Get Movie Info using cURL Source: https://apiv2-doc.twitcasting.tv/ Use this endpoint to retrieve detailed information about a specific live or recorded movie. Ensure you include the necessary authorization and API version headers. ```curl curl -X GET "https://apiv2.twitcasting.tv/movies/189037369" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Get Movies by User using cURL Source: https://apiv2-doc.twitcasting.tv/ Retrieve a list of past live recordings for a specific user. You can filter results using offset and limit parameters. The user can be identified by their ID or screen ID. ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_jp/movies?offset=10&limit=20" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Get Access Token using Authorization Code Grant Source: https://apiv2-doc.twitcasting.tv/ Use this POST request to exchange an authorization code for an access token. Ensure all parameters, including client ID, secret, and redirect URI, match your application's registration details. ```curl curl -X POST "https://apiv2.twitcasting.tv/oauth2/access_token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "code={CODE}" \ -d "grant_type=authorization_code" \ -d "client_id={CLIENT_ID}" \ -d "client_secret={CLIENT_SECRET}" \ -d "redirect_uri={REDIRECT_URI}" ``` -------------------------------- ### Get Access Token - Authorization Code Grant Source: https://apiv2-doc.twitcasting.tv/ Obtain a user's access token by exchanging an authorization code. This flow is suitable for server-side applications. ```APIDOC ## POST /oauth2/access_token ### Description Exchanges an authorization code for a user's access token. This is part of the Authorization Code Grant flow. ### Method POST ### Endpoint https://apiv2.twitcasting.tv/oauth2/access_token ### Parameters #### Request Body - **code** (string) - Required - The authorization code received after user consent. - **grant_type** (string) - Required - Must be set to "authorization_code". - **client_id** (string) - Required - Your application's Client ID. - **client_secret** (string) - Required - Your application's Client Secret. - **redirect_uri** (string) - Required - The redirect URI configured for your application. ### Request Example ```curl curl -X POST "https://apiv2.twitcasting.tv/oauth2/access_token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "code={CODE}" \ -d "grant_type=authorization_code" \ -d "client_id={CLIENT_ID}" \ -d "client_secret={CLIENT_SECRET}" \ -d "redirect_uri={REDIRECT_URI}" ``` ### Response #### Success Response (200 OK) - **token_type** (string) - Fixed value "Bearer". - **expires_in** (int) - The number of seconds until the token expires. - **access_token** (string) - The obtained access token. #### Response Example ```json { "token_type": "Bearer", "expires_in": 15552000, "access_token": "{ACCESS_TOKEN}" } ``` #### Error Responses This API may return Validation Error or Bad Request. ``` -------------------------------- ### Get Comments for a Movie using cURL Source: https://apiv2-doc.twitcasting.tv/ Retrieve comments for a specific movie using its ID. You can specify offset and limit for pagination. The default limit is 10 comments. ```bash curl -X GET "https://apiv2.twitcasting.tv/movies/189037369/comments?offset=10&limit=10" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` -------------------------------- ### Sample Response for Support User Source: https://apiv2-doc.twitcasting.tv/ This is a sample JSON response after successfully initiating a support request. It indicates the number of users for whom support was successfully added. ```json { "added_count": 2 } ``` -------------------------------- ### Sample Response for Unsupport User Source: https://apiv2-doc.twitcasting.tv/ This sample JSON response is returned after successfully removing support for users. It specifies the count of users for whom support was removed. ```json { "removed_count": 2 } ``` -------------------------------- ### Support User Request (cURL) Source: https://apiv2-doc.twitcasting.tv/ This cURL command demonstrates how to send a request to become a supporter of one or more users. Ensure you replace {ACCESS_TOKEN} with your valid API token. ```curl curl -X PUT "https://apiv2.twitcasting.tv/support" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" \ -d '{"target_user_ids": ["casma_jp", "twitcasting_pr"]}' ``` -------------------------------- ### Sample Response: RTMP Stream Enabled Source: https://apiv2-doc.twitcasting.tv/ This is a sample successful response when RTMP streaming is enabled, providing the necessary URL and stream key. ```json { "enabled": true, "url": "rtmp://rtmp02.twitcasting.tv/publish_tool/twitcasting_jp?user=twitcasting_jp&key=this_is_secret_key&client_type=public_api&is_publisher_tool=1", "stream_key": "twitcasting_jp" } ``` -------------------------------- ### Error Response: Application Disabled Source: https://apiv2-doc.twitcasting.tv/ This response is returned when the application is disabled. Users should contact support for assistance. ```json { "error":{ "code":2001, "message":"Application is disabled" } } ``` -------------------------------- ### Sample Current Live Response JSON Source: https://apiv2-doc.twitcasting.tv/ This JSON object details the current live broadcast, including movie information, broadcaster details, and associated tags. The 'is_live' field indicates the broadcast status. ```json { "movie":{ "id":"189037369", "user_id":"182224938", "title":"ライブ #189037369", "subtitle": "ライブ配信中!", "last_owner_comment": "もいもい", "category": "girls_jcjk_jp", "link":"http://twitcasting.tv/twitcasting_jp/movie/189037369", "is_live":true, "is_recorded":false, "comment_count":2124, "large_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1.jpg", "small_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1-s.jpg", "country":"jp", "duration":1186, "created":1438500282, "is_collabo":false, "is_protected":false, "max_view_count":1675, "current_view_count":20848, "total_view_count":20848, "hls_url":"https://twitcasting.tv/twitcasting_jp/metastream.m3u8/?video=1" }, "broadcaster":{ "id":"182224938", "screen_id":"twitcasting_jp", "name":"ツイキャス公式", "image":"http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/613625726512705536/GLlBoXcS_normal.png", "profile":"ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは https://t.co/4gCf7XVm7N までお願いします。公式Facebookページhttps://t.co/bxYVwpzTJB\n公式Instagram\nhttps://t.co/Bm2O2J2Kfs", "level":24, "last_movie_id":"189037369", "is_live":true, "supporter_count": 0, "supporting_count": 0, "created": 0 }, "tags":["人気", "コンティニュー中", "レベル40+", "初見さん大歓迎", "まったり", "雑談"] } ``` -------------------------------- ### Sample Movie Response JSON Source: https://apiv2-doc.twitcasting.tv/ This JSON structure represents a sample response for a movie listing, detailing total count and an array of movie objects with their respective properties. ```json { "total_count": 5, "movies":[ { "id":"323387579", "user_id":"2880417757", "title":"ライブ #323387579", "subtitle": "ライブ配信中!", "last_owner_comment": "こんにちは", "category": "girls_jcjk_jp", "link":"http://twitcasting.tv/twitcasting_pr/movie/323387579", "is_live":false, "is_recorded":false, "comment_count":64, "large_thumbnail":"http://202-230-12-93.twitcasting.tv/image3/image.twitcasting.tv/image57_1/bb/80/134680bb-1.jpg", "small_thumbnail":"http://202-230-12-93.twitcasting.tv/image3/image.twitcasting.tv/image57_1/bb/80/134680bb-1-s.jpg", "country":"jp", "duration":995, "created":1479379075, "is_collabo":false, "is_protected":false, "max_view_count":22, "current_view_count":71, "total_view_count":71, "hls_url":"https://twitcasting.tv/twitcasting_pr/metastream.m3u8/?video=1" }, { "id":"189037369", "user_id":"182224938", "title":"ライブ #189037369", "subtitle": "ライブ配信中!", "last_owner_comment": "もいもい", "category": "girls_jcjk_jp", "link":"http://twitcasting.tv/twitcasting_jp/movie/189037369", "is_live":false, "is_recorded":false, "comment_count":2124, "large_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1.jpg", "small_thumbnail":"http://202-230-12-92.twitcasting.tv/image3/image.twitcasting.tv/image55_1/39/7b/0b447b39-1-s.jpg", "country":"jp", "duration":1186, "created":1438500282, "is_collabo":false, "is_protected":false, "max_view_count":1675, "current_view_count":20848, "total_view_count":20848, "hls_url":"https://twitcasting.tv/twitcasting_jp/metastream.m3u8/?video=1" }, ... ] } ``` -------------------------------- ### Supporter List Source: https://apiv2-doc.twitcasting.tv/ Retrieves a list of users who support a specified user. Requires 'Read' permission. Rate limit is 30 requests per 60 seconds. ```APIDOC ## GET /users/:user_id/supporters ### Description Retrieves a list of users who support a specified user. ### Method GET ### Endpoint /users/:user_id/supporters ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID or screen_id of the user. #### Query Parameters - **offset** (int) - Optional - The starting position from the beginning. Minimum value is 0. Defaults to 0. - **limit** (int) - Optional - The number of items to retrieve. Minimum value is 1, maximum value is 20. Defaults to 20. - **sort** (string) - Required - The sort order. Use "new" for newest first, "ranking" for contribution ranking. ### Request Example ```curl curl -X GET "https://apiv2.twitcasting.tv/users/twitcasting_dev/supporters?offset=10&limit=20&sort=ranking" \ -H "Accept: application/json" \ -H "X-Api-Version: 2.0" \ -H "Authorization: Bearer {ACCESS_TOKEN}" ``` ### Response #### Success Response (200) - **total** (int) - The total number of records (may differ from the actual number of records retrieved). - **supporters** (array) - An array of SupporterUser objects. #### SupporterUser object Represents a supporter user. It is the same as the User object except for `point`, `supported`, and `total_point`. - **id** (string) - User ID. - **screen_id** (string) - An identifier similar to `id`, but `screen_id` can be changed by the user. - **name** (string) - Human-readable user name. - **image** (string) - URL of the user icon. - **profile** (string) - User profile text. - **level** (int) - User level. - **last_movie_id** (string|null) - The ID of the last live stream by the user. - **is_live** (bool) - Whether the user is currently live streaming. - **supported** (int) - Unix timestamp of when the user was supported. - **supporter_count** (int) - The number of users supporting this user. - **supporting_count** (int) - The number of users this user is supporting. - **point** (int) - Item/Score. - **total_point** (int) - Cumulative score. - **created** (int) - Deprecated. This parameter is deprecated and will return a fixed value of `0`. #### Response Example ```json { "total": 1234, "supporters": [ { "id":"182224938", "screen_id":"twitcasting_jp", "name":"ツイキャス公式", "image":"http://202-234-44-53.moi.st/image3s/pbs.twimg.com/profile_images/613625726512705536/GLlBoXcS_normal.png", "profile":"ツイキャスの公式アカウントです。ツイキャスに関するお知らせなどを投稿します。なお、お問い合わせは https://t.co/4gCf7XVm7N までお願いします。公式Facebookページhttps://t.co/bxYVwpzTJB\n公式Instagram\nhttps://t.co/Bm2O2J2Kfs", "level": 24, "last_movie_id":"189037369", "is_live":true, "supported":1632716873, "supporter_count": 0, "supporting_count": 0, "created": 0, "point": 15, "total_point": 300 }, { "id":"2880417757", "screen_id":"twitcasting_pr", "name":"ツイキャス運営事務局", "image":"http://202-234-44-61.moi.st/image3s/pbs.twimg.com/profile_images/740857980137050112/4sIEkzV8_normal.jpg", "profile":"モイ! ツイキャスを運営しているモイ株式会社広報担当のアカウントです。公式アカウントはこちら! @twitcasting_jp", "level": 23, "last_movie_id":"323387579", "is_live":false, "supported":1632716873, "supporter_count": 0, "supporting_count": 0, "created": 0, "point": 30, "total_point": 45 }, ... ] } ``` #### Error Responses This API may return Not Found and Validation Error in addition to common error responses. ``` -------------------------------- ### Support User Source: https://apiv2-doc.twitcasting.tv/ Allows a user to become a supporter of one or more target users. Requires 'Write' permission and is subject to rate limits. ```APIDOC ## Support User ### Description Designates the authenticated user as a supporter of the specified target users. ### Method PUT ### Endpoint /support ### Parameters #### Request Body - **target_user_ids** (array[string]) - Required - An array of user IDs or screen IDs of the users to support. Maximum 20 users per request. ### Request Example ```json { "target_user_ids": ["casma_jp", "twitcasting_pr"] } ``` ### Response #### Success Response (200) - **added_count** (int) - The number of users successfully added as supporters. ### Response Example ```json { "added_count": 2 } ``` ```