Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $oneSignalHeader = array('Content-Type' => 'application/json; charset=utf-8',
- 'Authorization' => 'Basic'.$KEY);
- $content = array(
- "en" => "제목"
- );
- $headings = array(
- "en" => "내용"
- );
- $fields = array(
- 'app_id' => "e65616cf-e050-438c-8512-418e257ab4e6",
- 'include_player_ids' => array('0d1d74d4-12a4-43bb-b66f-5e58e6664f88'),
- 'contents' => $content,
- 'headings' => $headings,
- );
- $fields = json_encode($fields);
- $response = Requests::post("https://onesignal.com/api/v1/notifications", $oneSignalHeader, $fields);
- $ret = json_decode($response->body);
- var_dump($ret);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement