Closed LtotheWT closed 7 years ago
I haven't tested this code, but the basic format should be:
$response = OneSignal::postApp([
"name" => "Your App Name", // This is the only required line
"apns_env" => "sandbox", // Optional Settings
"gcm_key" => "wasdf1234" // Optional Settings
]);
var_dump( json_decode( $response->getBody()->getContents(), true) );
Note that, per the OneSignal Documentation, you MUST have your REST API key and User Auth key set - see the README on how to store those in your .env file.
Would you give an example of postApp($data) ??