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 Dashboard. 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-_.]+. news
    API Response

    Sample Response Body

    {
        "subscribers": [
            "a3bc47808cfd31c1a66517",
            "40f3073bb387e3829d01f6"
        ]
    }
    Response Schema

    Field Description Example
    subscribers
    String[]
    Array of device tokens currently subscribed to the provided Pub/Sub topic. ["40f3073bb387e3829d01f6"]
    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
    URL Param Value
    TOPIC
    SECRET_API_KEY
    API Response

    500 CLIENT ERROR

    N/A