Backwards

Use with Php

Make HTTP GET calls, manage errors and know API.


A basic example:


$token = "TOKEN";
$text = "NotificationText";

$url = "http://api.rpinotify.it/notification/".$token."/text/".$text;
$text = str_replace(' ', '%20', $text);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
						


Variable explanation:

  • $tokenPersonal token assigned during the registration process.
  • $testonotiNotification text

$text = str_replace(' ', '%20', $text); is one of the several ways to convert spaces into%20.

API - Call structure

http://api.rpinotify.it/notification/$TOKEN/text/$TEXT

Variable name Description Format
$TOKEN Personal token. Alphanumeric string
$TEXT Notification text. Text (without spaces - use %20)

API - errors

Code errors are in curl answer.

  • InUrl parameters error Call structure not correct.
  • Token error Token not valid or digital signature void.
  • Database connection error Database error.
  • Database read error Database error.
  • SendNotifications bot (in server) error Notification sending impossible.
  • Database write error Database error.
  • No error Everything okay.
Service spammers will be automatically banned by RpiNotify.

RpiNotify is an Italian project supported by RaspberryItaly

The first Italian RaspberryPi community.