PushPrime uses token based authentication for API calls. You can generate API token from the website dashboard. Generated tokens allow the PushPrime servers to properly authenticate that the API calls are originating from valid server.
The token needs to be sent in "token" header in your calls to our server.
Here is how to send the token header using cURL
curl -H "token: <insert token value here>" https://pushprime.com/api/
Here is how to send the token header using php
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $apiUrl); curl_setopt($ch, CURLOPT_HTTPHEADER, array('token: '.$apiKey)); curl_exec($ch); curl_close($ch);
Please note that tokens generated for API does not expire, so in case your token get stolen you'll have to delete the previous one and generate new one. Generating new token will not have any effect on your app or subscribers.