question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

400 Bad Request: wrong file identifier/HTTP URL specified

See original GitHub issue

I am using the latest version of the library.

Expected Behavior

This has to handle http://dl.nex1music.ir/1396/07/03/Mohsen%20Salehi%20-%20Bigharari.mp3 URL, but gives an error. The given URL works out of the library properly.

Actual Behavior

2017-09-25T17:35:53.528481+00:00 app[web.1]: Unhandled rejection Error: ETELEGRAM: 400 Bad Request: wrong file identifier/HTTP URL specified 2017-09-25T17:35:53.528493+00:00 app[web.1]: at BaseError (/app/node_modules/node-telegram-bot-api/src/errors.js:10:5) 2017-09-25T17:35:53.528495+00:00 app[web.1]: at TelegramError (/app/node_modules/node-telegram-bot-api/src/errors.js:56:5) 2017-09-25T17:35:53.528496+00:00 app[web.1]: at request.then.err (/app/node_modules/node-telegram-bot-api/src/telegram.js:213:15) 2017-09-25T17:35:53.528496+00:00 app[web.1]: at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23) 2017-09-25T17:35:53.528497+00:00 app[web.1]: at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:512:31) 2017-09-25T17:35:53.528497+00:00 app[web.1]: at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:569:18) 2017-09-25T17:35:53.528498+00:00 app[web.1]: at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:614:10) 2017-09-25T17:35:53.528498+00:00 app[web.1]: at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:693:18) 2017-09-25T17:35:53.528499+00:00 app[web.1]: at Async._drainQueue (/app/node_modules/bluebird/js/release/async.js:133:16) 2017-09-25T17:35:53.528500+00:00 app[web.1]: at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:143:10) 2017-09-25T17:35:53.528500+00:00 app[web.1]: at Immediate.Async.drainQueues (/app/node_modules/bluebird/js/release/async.js:17:14) 2017-09-25T17:35:53.528501+00:00 app[web.1]: at runCallback (timers.js:672:20) 2017-09-25T17:35:53.528501+00:00 app[web.1]: at tryOnImmediate (timers.js:645:5) 2017-09-25T17:35:53.528502+00:00 app[web.1]: at processImmediate [as _immediateCallback] (timers.js:617:5)

Steps to reproduce the Behavior

bot.onText(/^\/320$/, (msg, match) => {
    bot.sendChatAction(msg.chat.id,'upload_audio');
    bot.sendAudio(msg.chat.id, 'http://dl.nex1music.ir/1396/07/03/Mohsen%20Salehi%20-%20Bigharari.mp3');
});

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:22
  • Comments:23 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
ordimanscommented, Sep 9, 2021

Have the problem with sendAudio with URL string. So what is the solution ?

EDIT : I added ?random=64 and it worked.

5reactions
alytvynovcommented, May 6, 2020

+1 still no solution ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Telegram bot weird error : Bad Request: wrong file identifier ...
I use file_id that i've got from a channel's post. What is the reason of that error? Bad Request: wrong file identifier/HTTP URL...
Read more >
400 Bad Request: wrong file identifier/HTTP URL specified
I am using the latest version of the library. Expected Behavior. This has to handle ...
Read more >
telegram-bot - wrong file identifier/HTTP URL specified
I am sending message to telegram channel using bot. With using webhook method. I'm sending file_id via the link. I got the file_id...
Read more >
errors.go - tucnak/telebot - Sourcegraph
ErrWrongFileID = NewError(400, "Bad Request: wrong file identifier/HTTP URL specified"). ErrWrongFileIDCharacter = NewError(400, "Bad Request: wrong remote ...
Read more >
Why i get Wrong file identifier/HTTP URL specified error in ...
[Solved]-Why i get Wrong file identifier/HTTP URL specified error in telegram ... How to get more info on the 400 Bad Request Error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found