Send OneSignal Push Notification via PHP cURL
- PHP cURL
- OneSignal API
- Bootstrap4
- Clone this Github Respo
git clone https://github.com/mskian/onesignal-php
- Install dependency packages
cd onesignal-php
composer install
- Add your OneSingal APP API KEY and APP ID in
.env
File (You can Find the APP ID and REST API KEY in your APP's Settings page)
touch .env
File - .env
👇 👇 👇 put this on .env
file
APIKEY = "YOUR REST API KEY"
APPID = "YOUR ONESIGNAL APP ID"
- If you are going to Run this Script Locally then Execute with PHP CLI Built-in Web server
php -S localhost:8080
or
php -S 127.0.0.1:8080
MIT