# Getting an error related to telegram receiver node

**URL:** <https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594>\
**Category:** General\
**Created:** [18 February 2022 12:10 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594 "2022-02-18T12:10:44Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 12:10 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/1 "2022-02-18T12:10:44Z")

</div>

Hello Experts,

I have newly installed node-red in Ubuntu 20 OS successfully. I have installed node-red-contrib-telegrambot package from npm too. But when I am simply importing "receiver" node of teelgram its keep giving error, details of node and error are as follows:

Node:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/ddaf4052377230e20036873cb7bd74fd4d95348b.png)

**Errors:**  
In server logs:  
`telegram" 18 Feb 12:05:26 - [warn] [telegram bot:hex_decimal id] Unknown error. Trying again.`

**In UI logs:**  
`ETELEGRAM: 404 Not Found`

I have tried searching Online and in here forums but didn't get much on this one, my node-red project has NOTHING apart from this only node, any help/guidance is greatly appreciated.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 12:14 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/2 "2022-02-18T12:14:13Z")

</div>

What versions of nodejs and node-red did you install?

Does the Ubuntu have internet access?

Have you setup a bot and entered the API key?

Lastly, what do you mean by "when I am simply importing "receiver" node of teelgram its keep giving error"? Can you describe in steps what you do and where you see this error?

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 12:19 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/3 "2022-02-18T12:19:27Z")

</div>

Hello @Steve-Mcl ,

Thanks for your time here, following are the answers on your questions:

Yes, its an aws server and similar setup for me running fine for another aws server(inbound rules are added and port 1880 is opened to take traffic since I can hit link in browser).

Yes I have created a bot from "Bot father" and entered token provided by it into config, I didn't share it since I thought it could be a security issue etc.

I mean I am getting 2 errors, one `ETELEGRAM: 404 Not Found` on node-red UI side(after applying verbose logging option of telegram receiver) and another in server /var/syslogs is the location and error is: `"telegram" 18 Feb 12:05:26 - [warn] [telegram bot:hex_decimal id] Unknown error. Trying again.`.

Kindly do let me know if any other information is required, cheers.

NOTE: There is nothing present in this project apart from this node and yet its giving this error, just adding this point here.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 12:32 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/4 "2022-02-18T12:32:14Z")

</div>

> [@RavinderSingh13](#):
>
> Yes, its an aws server and similar setup for me running fine for another aws server(inbound rules are added and port 1880 is opened to take traffic since I can hit link in browser

Telegram doesn't communicate to the telegram servers on port 1880. It goes out (from the node-red server) to `https://api.telegram.org` - does your setup permit https requests to go out of the node environment?

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 12:37 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/5 "2022-02-18T12:37:35Z")

</div>

Thank you for your response @Steve-Mcl , yes I could see I can `wget` to link your link, if that is what you meant.

```auto
wget https://api.telegram.org
HTTP request sent, awaiting response... 200 OK
Length: 40198 (39K) [text/html]
Saving to: ‘index.html’

```

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 12:46 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/6 "2022-02-18T12:46:20Z")

</div>

Yes, thats good but can node-red make the request?

try a HTTP Request node - see if you get a 200 response.

Also, can you answer my questions...

> [@Steve-Mcl](#):
>
> What versions of nodejs and node-red did you install?

> [@Steve-Mcl](#):
>
> Can you describe in steps what you do and where you see this error?

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 12:51 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/7 "2022-02-18T12:51:08Z")

</div>

_For your suggestion:_  
`try a HTTP Request node - see if you get a 200 response.`  
could you please do guide me how to do so?

For node version when I do a `node -v` I get `v10.19.0` AND for node-red I get `Node-RED version: v2.2.1` .

For steps, I installed node js first then `npm` followed by `node-red-contrib-telegrambot`, then I logged into 1880 port UI of node-js, gone to `manage pallets` and installed again to UI `node-red-contrib-telegrambot`.

once these done I dragged and dropped telegram's receiver node and once I given all details for bot. token etc and deployed it, it started giving errors.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 12:57 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/8 "2022-02-18T12:57:39Z")

</div>

> [@RavinderSingh13](#):
>
> For node version when I do a `node -v` I get `v10.19.0` AND for node-red I get `Node-RED version: v2.2.1` .

This might be part of the problem.

Node-red v2+ has a minimum requirement of nodejs v12 (v10 is EOL)

For ubuntu, the recommendation is to use the installer script detailed in the node-red docs. You can still run the installer script & add ` --node14` to the end to force an upgrade.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 12:58 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/9 "2022-02-18T12:58:53Z")

</div>

> [@RavinderSingh13](#):
>
> `try a HTTP Request node - see if you get a 200 response.`  
> could you please do guide me how to do so?

[https://cookbook.nodered.org/http/#http-requests](https://cookbook.nodered.org/http/#http-requests)

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 13:41 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/10 "2022-02-18T13:41:32Z")

</div>

Thanks a TON @Steve-Mcl for sharing link, yes I have tested it and `curl` command gives me Good response.

```auto
curl http://localhost:1880/hello
<html>
    <head></head>
    <body>
        <h1>Hello World!</h1>
    </body>
</html>

```

So now the only option is I need to upgrade my node and npm also? Kindly confirm once and I could do the same, is it required to remove node, npm OR we can upgrade them itself? Thanks for your time and guidance here.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 14:10 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/11 "2022-02-18T14:10:53Z")

</div>

Hello @Steve-Mcl,

I have updated node's version to `node -v` v14.19.0 and node version is `v2.2.1`. When I again installed node-red-contrib-telegrambot and try putting simple receiver it gives me same errors ☹

Could you please guide here, will be grateful to you.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 15:26 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/12 "2022-02-18T15:26:48Z")

</div>

> [@RavinderSingh13](#):
>
> Thanks a TON @Steve-Mcl for sharing link, yes I have tested it and `curl` command gives me Good response.
> 
> ```auto
> curl http://localhost:1880/hello
> <html>
> <head></head>
> <body>
> <h1>Hello World!</h1>
> </body>
> </html>
> 
> ```

You have simply created an endpoint and tested it from localhost. That doesn't test node --\> telegram. You were supposed to try using the http request node to test connectivity from your node-red instance to the telegram Https endpoint.

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 15:46 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/13 "2022-02-18T15:46:15Z")

</div>

Thanks @Steve-Mcl for answer. I have tried this code from link provided in previous posts. Could you please guide me on how exactly I could test that, I am sorry I am not getting it now to check from node to telegram check. Will be grateful go you 🙏

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 15:56 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/14 "2022-02-18T15:56:12Z")

</div>

I am simply trying to get you to confirm connectivity from node-red to telegram API to see if there is a communication path.

Import this example: [Set the URL of a request : Node-RED](https://cookbook.nodered.org/http/set-request-url) & Set the URL to `https://api.telegram.org`. Do you get a status 200?

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [18 February 2022 16:17 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/15 "2022-02-18T16:17:40Z")

</div>

Thanks @Steve-Mcl, I have used following json file for flow(only change link and rest is from your guided url).  
`[{ "id": "11167f67.5d5031", "type": "inject", "z": "44d1b5142cfbb4d4", "name": "cars on craigslist", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" }], "repeat": "", "crontab": "", "once": true, "onceDelay": "20", "topic": "", "payload": "http://vancouver.craigslist.org/search/sss?format=rss&query=cars", "payloadType": "str", "x": 130, "y": 260, "wires": [[ "70154cd4.de1444"] ] } ]`

And when I set frequency to 20 sec or so for inject node then I get following output in console:

```auto
<!DOCTYPE html>
<html class="">
  <head>
    <meta charset="utf-8">
    <title>Bots: An introduction for developers</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta property="description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands…">
    <meta property="og:title" content="Bots: An introduction for developers">
    <meta property="og:image" content="75f7c457f2561cbf84">
    <meta property="og:description" content="Bots are third-party applications that run inside Telegram. Users can interact with bots by sending them messages, commands…">
    <link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />

    <link href="/css/bootstrap.min.css?3" rel="stylesheet">
    
    <link href="/css/telegram.css?215" rel="stylesheet" media="screen">
    <style>
    </style>
  </head>
  <body class="preload">
    <div class="dev_page_wrap">
      <div class=...

```

I have set `https://api.telegram.org` in `http_request` node.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 February 2022 18:07 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/16 "2022-02-18T18:07:49Z")

</div>

Ok, so we seem to have established your node red instance can communicate to [api.telegram.org](http://api.telegram.org)

Now can you provide a step by step as asked previously. something like...

1. open node-red editor
2. drag an xxxxx telegrame node to workspace
3. open the nodes edit dialog and set to this [insert screenshot] and my bot config to this [insert screenshot with token and bot name redacted]
4. blah blah
5. blah blah
6. Press Deply
7. Press Inject
  1. see error in debug [insert screenshot]
  2. see error in node-red console [insert copy of error in log]

---

<div class="post-metadata">

**Author:** ![RavinderSingh13](https://avatars.discourse-cdn.com/v4/letter/r/b38774/32.png) [@RavinderSingh13](https://discourse.nodered.org/u/RavinderSingh13)\
**Post date:** [19 February 2022 13:09 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/17 "2022-02-19T13:09:57Z")

</div>

Thanks @Steve-Mcl, for your time and help here. Its a GREAT forum with knowledgeable people here , appreciate your help and guidance here 👍

FYI please!! I have figured out the problem what it was.

actually error message(`ETELEGRAM: 404 Not Found)`which I understood later) was self explanatory(some how 🙂 ) So when I had to give token in receiver of telegram node I have given it after colon. Lets say, token is`etcetc:abcdefghijkl` so I have not given `etcetc` I missed it(may be because of newline bot father has given me, though its a miss which created this error).

I actually come across a thread in SO(stack overflow) where they mentioned to get details to telegram link its pattern should be like: `https://api.telegram.org/bot_name:bot_token` so when I read that it clicked into my mind and I re-checked my token then BINGO I found complete token and copy/pasted it and it worked fine then.

I am not having right now that SO link with me, will update it here if I get it. I again appreciate help of @Steve-Mcl and forum here 👍

Cheers and happy learning.

Thanks,  
Ravinder Singh

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [5 March 2022 13:10 UTC](https://discourse.nodered.org/t/getting-an-error-related-to-telegram-receiver-node/58594/18 "2022-03-05T13:10:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
