pushpad

Clean Subscriptions best practice for Pushpad debug


I'm testing a Pushpad implementation on several devices, with more browsers on each. Resetting previous subscriptions produces big headache.

For a given pushpad project, what is the best practice for resetting subscriptions on all browsers, on every device I'm testing on?


Solution

  • You can remove subscriptions in multiple ways.

    The easiest way to reset a subscription completely is to remove the permission for the website from the browser settings. The steps are described in this blog post.

    After you have revoked the permission:

    An alternative is to remove subscriptions from the Pushpad dashboard, using the REST API or with the Javascript SDK. For example:

    pushpad('unsubscribe');
    

    Note that these methods (Pushpad dashboard, REST API, Javascript SDK) are different from resetting permission from the browser settings. The difference is that these methods only remove the subscription from Pushpad (but do not make it invalid). If you try to subscribe the user again, he won't see the permission prompt and the old endpoint (which is still valid) will be sent to Pushpad again.