F
F
Finalls2018-04-19 09:49:06
CentOS
Finalls, 2018-04-19 09:49:06

Telegram bot CURL what could be the problem?

Good day,
I have a new telegram bot. I can not force the server to send messages on its behalf.
Given:
Centos 7
curl 7.59.0
updated nss
When trying to send message like this from console

curl --header 'Content-Type: application/json' --request 'POST' --data '{"chat_id":"2367*****","text":"test message here"}' "https://api.telegram.org/bot598******:AAFx8OAg8dj184XBTldynqezf64trbOQ/sendMessage"

In response, I get something like this.
curl --header 'Content-Type: application/json' --request 'POST' --data '{"chat_id":"2367*****","text":"test message"}' "https://api.telegram.org/bot598******:AAFx8OAg8dj184XBTldynqezf64trbOQ/sendMessage" -vv
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 149.154.167.220...
* TCP_NODELAY set
* Connected to api.telegram.org (149.154.167.220) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: none
  CApath: none
* loaded libnssckbi.so
* NSS error -5938 (PR_END_OF_FILE_ERROR)
* Encountered end of file
* stopped the pause stream!
* Closing connection 0
curl: (35) Encountered end of file

Even with a simple call to this site without data, the same error pops up.
Moreover, if you make the same request to Google, there is no problem.
When sending a message through the browser with the same tokens, chat id , Everything goes well.
How to fix it?)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CityCat4, 2018-04-19
@Finalls

Blocking?

F
Finalls, 2018-04-19
@Finalls

Yes, it turns out that the bastards blocked the mts .... I
sent it from a web browser through a proxy.
Added proxy and all is well.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question