Skip to main content

Hello! We’re currently setting up push notifications for our users, and it seems that currently there’s no straightforward way for a user to opt out of Klaviyo push notifications specifically. Our app uses multiple push services, so directing users to turn off all notifications from our app isn’t a viable option if they only want to turn off Klaviyo.

I understand there’s an endpoint to unregister a push token, but for users with multiple devices this would entail collecting all their push tokens and then looping over them to make sure they’re all unregistered. I’ve also seen mention of using the Segments API somehow to manage their consent. Would one of these approaches be better as a workaround than the other?

Thanks!

@jashton I recommend utilizing the following endpoint to retrieve push tokens for a specific profile: https://developers.klaviyo.com/en/reference/get_push_tokens_for_profile

Please note that you will need to first make a request to this endpoint: https://developers.klaviyo.com/en/reference/get_profiles in order to obtain the profile ID.

The GET request can be configured as follows:

https://a.klaviyo.com/api/profiles/?filter=equals(email,"<email>")

Assuming you have the email address associated with the profile, you may also utilize the phone number as a filter by using the `phone_number` parameter instead of the email.


Reply