How to use?

1. Start @notificator_ir_bot from your Telegram or Bale platform:

2. send /token command and get your token

3. Replace your token in code and send test message:

<?php
$params     = [
	'to'    => '<your_api_token>',
	'text'  => 'Hello! and welcome'
];

$ch         = curl_init( 'https://notificator.ir/api/v1/send' );

curl_setopt( $ch, CURLOPT_RETURNTRANSFER , true );
curl_setopt( $ch, CURLOPT_POSTFIELDS     , http_build_query( $params ) );

$result     = curl_exec( $ch );

curl_close( $ch );

$result     = json_decode( $result );

var formdata = new FormData();
formdata.append("to", "<your_api_token>");
formdata.append("text", "Hello! and welcome");

var requestOptions = {
  method    : 'POST',
  body      : formdata,
  redirect  : 'follow'
};

fetch("https://notificator.ir/api/v1/send", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
var axios = require('axios');
var FormData    = require('form-data');
var data        = new FormData();
data.append('to', '<your_api_token>');
data.append('text', 'Hello! and welcome');

var config      = {
  method    : 'post',
  url       : 'https://notificator.ir/api/v1/send',
  headers   : {
    ...data.getHeaders()
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

#Install requests lib => pip install requests
import requests

api_url         = 'https://notificator.ir/api/v1/send'
message_date    = {
    'to'    : '<your_api_token>',
    'text'  : 'Hello! and welcome'
}

result          = requests.post( api_url, json = message_date )

print( result.text )