Skip to content
Advertisement

Get User API key with PHP Pushover push notifications to iOS & Android

I want to use PHP Pushhover to push notification to specific devices / Android

<?php include('Pushover.php');   
$push = new Pushover(); 
$push->setToken('app token goes here'); 
$push->setUser('user token goes here');   
$push->setTitle('Hey Chris'); 
$push->setMessage('Hello world! ' .time());
$push->setUrl('http://chris.schalenborgh.be/blog/'); 
$push->setUrlTitle('cool php blog');   
$push->setDevice('iPhone'); 
$push->setPriority(0); 
$push->setTimestamp(time()); 
$push->setDebug(false);  
$go = $push->send(); ?> 

setToken(Your app API key) is a server API gets from Google Project Credentials, it’s fine, but where can I get the user API key for setUser(The user's API key)?

Note: I want to push notification to specific devices that the query choose them, and I’am using Cordova 3.4.

Advertisement

Answer

Every Pushover user has their own API key. This key is used by Pushover to send their messages to the correct users.

You can find that key at your profile page on http://pushover.net. Just login and grab your key there.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement