Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

users get unsubscribe after sending a notification #179

Open
Luizceolin1 opened this issue Mar 17, 2023 · 0 comments
Open

users get unsubscribe after sending a notification #179

Luizceolin1 opened this issue Mar 17, 2023 · 0 comments

Comments

@Luizceolin1
Copy link

I am using this api to register user
curl --location 'https://onesignal.com/api/v1/players' \ --header 'Content-Type: application/json' \ --header 'Authorization;' \ --header 'Cookie: __cf_bm=kTbvKvn.0o74p3i9eKwNcD_y9q4AwgQ.s8HyWmQyU9w-1679066423-0-AUVh/gAJyyp3mbkO5PadkoogWGxBmqKPsO7r8XPtkNZUQTT+Berpkm4gtSW82b1TMkvWS4nND9SgJ6Pmb2CyaJ4=' \ --data '{ "app_id" : "#", "identifier":"#", "language":"en", "device_type":0 }'

and this api to send a notification
curl --location 'https://onesignal.com/api/v1/notifications' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic my_token' \ --header 'Cookie: __cf_bm=kTbvKvn.0o74p3i9eKwNcD_y9q4AwgQ.s8HyWmQyU9w-1679066423-0-AUVh/gAJyyp3mbkO5PadkoogWGxBmqKPsO7r8XPtkNZUQTT+Berpkm4gtSW82b1TMkvWS4nND9SgJ6Pmb2CyaJ4=' \ --data '{ "app_id": "#####", "included_segments": ["Subscribed Users"], "data": {"foo": "bar"}, "contents": {"en": "Sampple Push Message"}, "include_player_ids": ["###"] }'
After send a notification, my user is set to "Not Subscribed", and the notification receive a error.
before_created
after_send_notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant