POST Authentication

Each API request is authenticated by a webpushrKey & webpushrAuthToken in the request header. This Key & Token is site specific and you can get this from Integration > API Keys menu in your Webpushr Web Console.

Example Request

curl -X POST \
-H "webpushrKey: <YOUR REST API KEY>" \
-H "webpushrAuthToken: <YOUR AUTHENTICATION TOKEN>" \
-H "Content-Type: application/json" \
https://app.webpushr.com/api/v1/authentication
$end_point = 'https://app.webpushr.com/api/v1/authentication';
$http_header = array( 
	"Content-Type: Application/Json", 
	"webpushrKey: <YOUR REST API KEY>", 
	"webpushrAuthToken: <YOUR AUTHENTICATION TOKEN>"
);		
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $http_header);
curl_setopt($ch, CURLOPT_URL, $end_point );
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
echo $response;

Result Format

{
   "status" : "success",
   "description" : "You are authorized", 
}
{
    "status": "failure",
    "type" : "header_invalid",
    "description": "Missing webpushrKey in header"
}
{
    "status": "failure",
    "type" : "authentication_failure",
    "description": "You are not authorized"
}