Documentation

REFL.ME works very simply. The user downloads the application and adds a link to the data source. After that, the application polls the data source at a specified interval and receives responses in JSON format. Based on these responses, the application shows messages and notifications.

Connecting REFL.ME applications to your web service is very easy. Simply process your GET requests from the application on the side of your web service and form the corresponding answers in JSON. JSON response with two mandatory keys "refl.me" and "message" is sufficient for operation.

The "refl.me" key must always be true, otherwise an error will be called. It's allowed to write "refl_me".
The "message" key is responsible for the notification text. The maximum length of the message is 360 characters. Empty "message" is ignored.
To create a notification in the application, simply change the value of the "message" key to a value different from the previous value.

Minimum JSON

{
        "refl.me":true,
        "message":"Hello!"
}

Example (PHP)

<?php
         header('Content-Type: application/json');
         $json_array = array('refl.me'=>true,'message'=>'Hello!');
         echo json_encode($json_array);
?>


Extended JSON

{
        "refl.me":true,
        "title":"Test",
        "message":"Hello!",
        "image":"https://refl.me/img/reflme.png",
        "go_link":"https://refl.me/",
        "refresh":96,
        "stealth":false,
        "close":false
}

"title" - notification title (maximum 36 characters).
"image" - http(s) reference to the image.
"refresh" - number of checks in 24 hours (0 - manual update, 288 - maximum, 96 - default).
"go_link" - http(s) link to the page with the full information (displays the button to go).
"stealth" - set "true" if you want to update the data on the user's device without notification.
"close" - set "true" if you want to close the source for updates on the user's device.

Test source (use in mobile application)

https://refl.me/test

REFL.ME allows you to additionally request a key from the user of the application and generate a request signature (secret) on its basis. This guarantees additional security and authentication of the user on the web service side. We recommend controlling the request time (time_stamp) for additional security.

JSON with request signature

{
        "refl.me":true,
        "message":"Hello!",
        "use_secret":true,
        "secret_ok":false
}

"use_secret" - set "true" if you want to enable signature control (secret).
"secret_ok" - set "true" if the signature is correct, "false" if the signature is incorrect (will show you the key request form).

After the user has entered the key, the application generates and transmits the signature of the GET request each time.
Request signature format(secret): [time_stamp]_[md5(time_stamp+key)]
For example, if time_stamp=1562272021 and key="test", then the request signature (secret) will be 1562272021_ed6808c7d7b53cc71c42c2f1aad0742f

Example of receiving and verifying a signature in PHP

<?php

        $key="test";

        $secret_array=explode("_",$_GET['secret']);
        $time_stamp=$secret_array[0];
        $checksum=$secret_array[1];

        if(md5($time_stamp.$key)===$checksum)
        {
        $secret_ok = true;
        $message="Hello!";
        }
        else
        {
        $secret_ok = false;
        $message="Error. Enter the secret key.";
        }

        $json_array = array();
        $json_array['refl.me']=true;
        $json_array['message']=$message;
        $json_array['use_secret']=true;
        $json_array['secret_ok']=$secret_ok;

        header('Content-Type: application/json');
        echo json_encode($json_array);

?>

URL for the test in the application (password: test)

https://refl.me/test_secret

User-Agent

refl.me;[application language];[unique identifier]

Deeplink

https://refl.me/+http://link on the data source
reflme://+http://link on the data source

If you like the application, tell your friends about it ;)
Thank you very much for your interest!


Notify

Notify me of release for iOS (coming soon)