
1.전체 사용자들에게 보내는경우
- included_segments 의 값으로 ['All'] 지정.
- include_player_ids는 사용하면 안됨.
$.ajax({
url: '<https://onesignal.com/api/v1/notifications>',
type: 'POST',
dataType: "json",
data: {
"app_id": app_id,
"included_segments": ['All'], //iclude_segments or include_player_ids 둘중 하나만 사용가능.
//"include_player_ids": player_id_array,
...
2.이벤트 수신 허용 사용자들에게만 보내는경우(특정그룹)
- included_segments 의 값으로 ['event_group'] 지정.
- include_player_ids는 사용하면 안됨.
$.ajax({
url: '<https://onesignal.com/api/v1/notifications>',
type: 'POST',
dataType: "json",
data: {
"app_id": app_id,
"included_segments": ['event_group'], //iclude_segments or include_player_ids 둘중 하나만 사용가능.
//"include_player_ids": player_id_array,
...
3.특정 사용자에게 보내는경우
- include_player_ids 의 값으로 ['a사용자의 푸시아이디','b사용자의 푸시아이디'] 형태로 여러명 지정가능
- included_segments 는 사용하면 안됨.
$.ajax({
url: '<https://onesignal.com/api/v1/notifications>',
type: 'POST',
dataType: "json",
data: {
"app_id": app_id,
//"included_segments": ['event_group'], //iclude_segments or include_player_ids 둘중 하나만 사용가능.
"include_player_ids": ['a사용자의 푸시아이디'],
...
Powered by (주)옐로우윈