How to send a photo with .webp extension via telegram bot - telegram-bot

When I try to send such a photo, I get an error:
example:
bot.send_photo(message.chat.id, photo=test.webp)
but i use links (hope it doesn't affect)
ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: wrong type of the web page content"

You have to specify the proper path of the file.
photo_url <- "https://www.gstatic.com/webp/gallery/1.webp"
bot.send_photo(message.chat.id, photo=photo_url)

Related

When trying to update a video snippet I always get a Forbidden response

I am creating an app to update my videos through the youtube api v3.
I have set up everything correctly according to the documentation. Have the API key and OAuth credentials. But everytime I try to update (in my app or in the API test page) I get this json response:
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://youtube.googleapis.com/youtube/v3/videos?part=snippet&alt=json returned "Forbidden". Details: "[{'message': 'Forbidden', 'domain': 'youtube.video', 'reason': 'forbidden'}]">
I'm getting so frustrated, this specific error only shows "Forbidden" with no extra info.
Does anyone knows what it could be? Thank you
X

Response code:400 Response message:Bad Request Jmeter api testing with JIRA with POST method

When try to create issue in Jira using the JMeter API with POST method, it does not allow to create issue and it shows error below.
I uploaded my all configuration image.
Can anybody correct me?
Thanks in advance.
Error message:
2020-12-27 19:48:35,841 ERROR o.a.j.p.h.s.HTTPJavaImpl: readResponse: java.io.IOException: Server
returned HTTP response code: 400 for URL: https://learntestapi.atlassian.net/rest/api/2/issue
2020-12-27 19:48:35,841 ERROR o.a.j.p.h.s.HTTPJavaImpl: Cause: java.io.IOException: Server returned
HTTP response code: 400 for URL: https://learntestapi.atlassian.net/rest/api/2/issue
Screenshots (2 images attached)
I think you're using an incorrect URL, i.e. it has to be:
/rest/api/2/issue/createmeta/QA/issuetypes/{issueTypeId}
to identify the issueTypeId you need to first execute call to the following endpoint:
/rest/api/2/issue/createmeta/QA/issuetypes
then choose an appropriate issue type and substitute it in the first request.
More information: Jira REST API examples
Also make sure that your HTTP Header Manager is configured to send Content-Type header with the value of application/json

400 error when I send Document url toTelegram bot with api

I want to send MP3 file in telegram with my bot but some files return 400 error.
foe example this url
http://www.dl.noisera.com/files/musics/1586023395/introhanditdown.mp3
is not send and return 400 error but this url
http://www.dl.noisera.com/files/musics/1586023929/hardknocklifeghettoanthem.mp3
is send.
my api code is:
$url = 'https://api.telegram.org/bot'.$bot_id.'/sendDocument?chat_id='.$chat_id.'&document=http://www.dl.noisera.com/'.$_POST["musicFile"];
file_get_contents($url);
what is problem?
Telegram servers have cache problems, it takes a few hours for new links to be found by their servers. You should manually download the file with your server and upload it when you get that error.

creating a twitter project

I am trying to create an MVC4 project that is going to read tweets using the streaming api. I am facing a challenge when im an trying to get an appId and appSecret. I am getting this error: "Error
The client application failed validation: Not a valid URL format
The client application failed validation: Not a valid URL format" when i am specifying my localhost address as my website and callback url. Please help.
This is how i am typing-in my URL http://localhost:50470/ still it does not work. I also tried this https://localhost:50470/
Thank you.
need to put in both the website and the callback URL the same domain value
Ex
Website:
http://127.0.0.1
Callback URL:
http://127.0.0.1/api

How can I read this url in Rebol?

when trying to read this kind of url
URL: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor,oc:U0dWSlhTVF9FSkNNNl9QTVhJ&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1275886800&key=yt1&signature=89195E808CB3FBBC7BDE7298A1DC0613D7987F00.D3064112E8F479C523F8DF4FBFDF392CE48167C2&factor=1.25&id=34e01ad39b34b5c9&
I get this error
read/binary url
connecting to: v4.lscache2.c.youtube.com
** User Error: Error. Target url: http://v4.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,
itag,algorithm...
** Near: read/binary url
In Rebol 3 you get:
** Access error: protocol error: "Server error: HTTP/1.1 403 Forbidden"
The message you're getting is Rebol 2's not-so-eloquent way of saying that. (You can also enter it in Firebug and see that using this raw URL does not work.)
I'd imagine that YouTube will only let you get the stream if the requesting HTTP header matches a certain pattern. Among potential things it might look for is a cookie specifically crafted for your session and designed to expire after a certain time.
As far as I understand it YouTube is not too keen on third party downloads of video data. They used to have a get_video API but appear to have disabled it. So you'll either have to fake up a cookie and make them think you're one of their players, or find a service which is friendlier to this sort of application.