Pub/Sub Subscribers API
Retrieve a list of devices subscribed to a certain topic.
-
API Reference
-
Test it out
-
GET https://api.pushy.me/topics/TOPIC?api_key=SECRET_API_KEY
Note: Make sure to replace
SECRET_API_KEY
with your app's Secret API Key, available in the Pushy Dashboard (Click your app -> API Authentication tab). This is a backend API endpoint. Never expose your application's Secret API Key in your client code.URL Parameters
Field Description Example TOPIC
The Pub/Sub topic to retrieve subscribers for. Topics are case-sensitive and must match the following regular expression: [a-zA-Z0-9-_.]{1,100}
.news API Response
Sample Response Body
{ "subscribers": [ "a3bc47808cfd31c1a66517", "40f3073bb387e3829d01f6" ], "pagination": "/topics/TOPIC?api_key=SECRET_API_KEY&page=2" }
Response Schema
Field Description Example subscribers
String[]Array of device tokens currently subscribed to the provided Pub/Sub topic
, limited to 1,000 per page.["40f3073bb387e3829d01f6"] pagination
StringA link to fetch the next page of results, in case there are more than 1,000 subscribers for this topic. /topics/TOPIC?api_key=SECRET_API_KEY&page=2 API Error Reference
Sample Error Response
{ "code": "INVALID_API_KEY", "error": "The Secret API Key you used to authenticate is invalid." }
There are no endpoint-specific error codes. Please consult the general error reference.
-
GET https://api.pushy.me/topics/TOPIC?api_key=SECRET_API_KEY
API Response
500 CLIENT ERROR
N/A