Posts: 58
Threads: 17
Joined: May 2017
Reputation:
1
Hi,
We have Telegram API working on LogicMachines. We copy the same code on SpaceLynk and it not works..
Is posible to make it work on SpaceLynk?
Thanks!
Posts: 111
Threads: 14
Joined: Nov 2019
Reputation:
6
Check your network settings. Make sure you have a working internet connection at your spaceLYnk. If it can't communicate to the internet it can't communicate with the API or if it's a local device make sure your spaceLYnk is in the same network as your API device (like Philips Hue gridge or so).
Posts: 58
Threads: 17
Joined: May 2017
Reputation:
1
Network is OK.
Code used is:
local telegram_url = 'https://api.telegram.org/'..token_bot..'/sendMessage?'
function telegram(message)
local data_str = 'chat_id=' .. chat_id .. '&text=' .. message..''
local res, code, headers, status = ssl.https.request(telegram_url, data_str)
log (res,code,headers,status)
end
Log Response:
* arg: 1
* nil
* arg: 2
* string: error:1409442E:lib(20):func(148):reason(1070)
* arg: 3
* nil
* arg: 4
* nil
Not working!
Thanks!