{"_id":"56afd977bc304a0d00ace1e3","parentDoc":null,"version":{"_id":"56acd71213ac890d001c3c7d","project":"56acd71213ac890d001c3c7a","__v":15,"createdAt":"2016-01-30T15:30:26.928Z","releaseDate":"2016-01-30T15:30:26.928Z","categories":["56acd71313ac890d001c3c7e","56acd8f113ac890d001c3c81","56acd8f95ac4060d0027865e","56acd93a13ac890d001c3c82","56ad20660ab3c00d00ce3347","56ad356a2a7860170013f714","56ad47eb0ab3c00d00ce334f","56afd523bc304a0d00ace1df","56b29a019621f20d00efb37e","56b657e11bc6970d009feee7","5845cc3c39950c1b002afe77","5845cde163c11b250037967e","5846efd45d064323007b17b4","588604da4674e32300efd160","588627882393d50f00f1322c"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"56acd71213ac890d001c3c7a","githubsync":"","category":{"_id":"56afd523bc304a0d00ace1df","pages":["56afd736b34d210d003d9ba9","56afd977bc304a0d00ace1e3","56b0e385135ec20d00baf9a9"],"project":"56acd71213ac890d001c3c7a","__v":3,"version":"56acd71213ac890d001c3c7d","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-01T21:58:59.198Z","from_sync":false,"order":4,"slug":"channel-resource","title":"Channel Resource"},"user":"56acd6caa040860d00ac94a2","__v":3,"editedParams":true,"editedParams2":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-01T22:17:27.695Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"var params = {\n\taccess_token: \"CHANNEL_ACCESS_TOKEN\",\n\tlimit: 1,\n\torder: 'desc',\n\tstatus: 'active',\n  include: 'user'\n};\n\n$.getJSON('https://api.gamewisp.com/pub/v1/channel/subscribers/', params, function(json) {\n    console.log(json);\n});","language":"javascript"},{"code":"<?php\n\n$client = new GuzzleHttp\\Client();\n\ntry {\n\n  $response = $client->get('https://api.gamewisp.com/pub/v1/channel/subscribers', [\n    'query' => [\n      'access_token'  => 'CHANNEL_ACCESS_TOKEN',\n      'limit': 1,\n\t\t\t'order': 'desc',\n\t\t\t'status': 'active',\n      'include': 'user'\n    ]\n  ]);\n\n  $result = $response->json();\n\n} catch (Exception $e) {\n\n  //error\n  $result = $e->getResponse()->json();\n\n}","language":"php"},{"code":"https://api.gamewisp.com/pub/v1/channel/subscribers?access_token=CHANNEL_ACCESS_TOKEN&limit=1&order=asc&status=active&include=user","language":"text","name":"Sample URL"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"result\": {\n    \"status\": 1,\n    \"message\": \"Subscribers Retrieved\"\n  },\n  \"data\": [\n    {\n      \"id\": 26,\n      \"user_id\": 87545,\n      \"status\": \"active\",\n      \"subscribed_at\": null,\n      \"tier_id\": \"3\",\n      \"user\": {\n        \"data\": {\n          \"id\": 87545,\n          \"username\": \"test\",\n          \"banned\": false,\n          \"deactivated\": false,\n          \"created_at\": \"2015-11-10 00:00:00\",\n          \"links\": {\n            \"uri\": \"/user/87545\"\n          }\n        }\n      }\n    }\n  ],\n  \"meta\": {\n    \"cursor\": {\n      \"current\": null,\n      \"prev\": null,\n      \"next\": \"MjY=\",\n      \"count\": 1\n    }\n  }\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"56afd977bc304a0d00ace1e9","ref":"","in":"query","required":true,"desc":"The OAuth2 Access Token of the channel.","default":"","type":"string","name":"access_token"},{"_id":"56b141d17ae4550d00062857","ref":"","in":"query","required":true,"desc":"the read_only scope is required, and supplied by default.","default":"read_only","type":"string","name":"scope"},{"_id":"56afd9f95b1f01170014dc50","ref":"","in":"query","required":false,"desc":"Allows optional information inclusion with this query. See \"Documentation\" section below.","default":"null","type":"string","name":"include"},{"_id":"56afd977bc304a0d00ace1e8","ref":"","in":"query","required":false,"desc":"Limit on the number of subscribers returned. Min: 1, max: 50","default":"10","type":"int","name":"limit"},{"_id":"56afd977bc304a0d00ace1e7","ref":"","in":"query","required":false,"desc":"Ordering of the created_at date on the returned subscribers. Options: asc, desc","default":"desc","type":"string","name":"order"},{"_id":"56afd977bc304a0d00ace1e6","ref":"","in":"query","required":false,"desc":"Filter the returned subscribers by status. Options: all, active, inactive, trial, twitch, grace_period, billing_grace_period. Options can be comma separated to return records that match any of the given status fields in the query","default":"all","type":"string","name":"status"},{"_id":"56afd977bc304a0d00ace1e5","ref":"","in":"query","required":false,"desc":"Used for pagination. See Response Pagination.","default":"null","type":"string","name":"cursor"},{"_id":"56afd977bc304a0d00ace1e4","ref":"","in":"query","required":false,"desc":"Used for pagination. See Response Pagination.","default":"nill","type":"string","name":"previous"}],"url":"/channel/subscribers"},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"This endpoint is paginated\",\n  \"body\": \"Make sure to review how our [Cursors](https://gamewisp.readme.io/docs/pagination-with-cursors) work to get the most out of this call.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"This endpoint Accepts  Include Parameters\",\n  \"body\": \"Be sure to review [how include parameters work](https://gamewisp.readme.io/docs/additional-includes) if you haven't yet.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Include Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Include Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"user\",\n    \"0-1\": \"Returns a user object nested with each subscriber object\",\n    \"1-0\": \"tier\",\n    \"1-1\": \"Returns a tier object nested within each subscriber object.\",\n    \"2-0\": \"user,tier\",\n    \"2-1\": \"Returns both the tier and user object nested within each subscriber object.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","excerpt":"Returns a channel's subscribers based on input parameters.","slug":"channelsubscribers","type":"endpoint","title":"/channel/subscribers"}

get/channel/subscribers

Returns a channel's subscribers based on input parameters.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

access_token:
required
string
The OAuth2 Access Token of the channel.
scope:
required
stringread_only
the read_only scope is required, and supplied by default.
include:
stringnull
Allows optional information inclusion with this query. See "Documentation" section below.
limit:
integer10
Limit on the number of subscribers returned. Min: 1, max: 50
order:
stringdesc
Ordering of the created_at date on the returned subscribers. Options: asc, desc
status:
stringall
Filter the returned subscribers by status. Options: all, active, inactive, trial, twitch, grace_period, billing_grace_period. Options can be comma separated to return records that match any of the given status fields in the query
cursor:
stringnull
Used for pagination. See Response Pagination.
previous:
stringnill
Used for pagination. See Response Pagination.

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "This endpoint is paginated", "body": "Make sure to review how our [Cursors](https://gamewisp.readme.io/docs/pagination-with-cursors) work to get the most out of this call." } [/block] [block:callout] { "type": "info", "title": "This endpoint Accepts Include Parameters", "body": "Be sure to review [how include parameters work](https://gamewisp.readme.io/docs/additional-includes) if you haven't yet." } [/block] [block:api-header] { "type": "basic", "title": "Include Parameters" } [/block] [block:parameters] { "data": { "h-0": "Include Parameter", "h-1": "Description", "0-0": "user", "0-1": "Returns a user object nested with each subscriber object", "1-0": "tier", "1-1": "Returns a tier object nested within each subscriber object.", "2-0": "user,tier", "2-1": "Returns both the tier and user object nested within each subscriber object." }, "cols": 2, "rows": 3 } [/block]