Я пытаюсь отправить услугу OneSignal. Я могу заставить его работать, включая « include_player_ids » .. но не могу заставить его работать с « сегментов »
Я пытаюсь это:
$data= array("app_id" => "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contents" => array("en" => "Check this!") ,
"filters" => array("segment"=> "test"),
"big_picture" => "http://www.xxxxx.com/img/logo2.png"
);
Ответ:
stdClass Object ( [errors] => Array ( [0] => Please include a case-sensitive header of Authorization: Basic with a valid REST API key. ) [reference] => Array ( [0] => https://documentation.onesignal.com/docs/accounts-and-keys#section-keys-ids ) )
Также пытается это:
$data= array("app_id" => "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"contents" => array("en" => "Check this!") ,
"segments" => "all",
"big_picture" => "http://xxxxxx.com/img/logo2.png"
);
Ответ:
stdClass Object ( [errors] => Array ( [0] => You must include which players, segments, or tags you wish to send this notification to. ) )