Code: Select all
:do {
:local telegramBotToken "xxxxxxxxx:secondpartOfTheToken";
:local destination "Number";
:local requestUrl "https://api.telegram.org/bot$telegramBotToken/sendMessage";
:local httpData "{\"chat_id\": \"$destination\", \"text\": \"This is a test from fetch\"}";
/tool fetch url=$requestUrl http-data=$httpData http-header-field=content-type:application/json http-method=post keep-result=no
} on-error={
/log info "finished with error";
}
/log info "finished";