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.
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.