telegram-bot-api
telegram-bot-api copied to clipboard
How to send picture of firebase storage via send photo api?
Hi
I am going to send picture using https://api.telegram.org/bot{tg_token}/sendPhoto?chat_id=-{tg_chat_id}&photo={photo_path}&caption={message}&parse_mode=Markdown
but I cant send picture of firebase storage.
i.e. https://firebasestorage.googleapis.com/v0/b/parasol-finance-21.appspot.com/o/projects%2F24kn8ifJpEuGmbQP8VmkxeXgjnVi5zXvFQzusgmT3CmD%2F1SP_IDO.png?alt=media&token=fa212a61-6dd9-4c63-9231-2206232c11a0
when I send this picture, I get this error.
I guess the issue is picture path of storage.
fyi: I can send photo like this : https://parasol.finance/assets/preview/projects.png
plz help me!
https://core.telegram.org/bots/api#sendphoto:
The photo must be at most 10 MB in size. The photo's width and height must not exceed 10000 in total. Width and height ratio must be at most 20.
Thanks for your reply, @levlam Yes I know it. I said I could send photo but just except of picture of storage.
The provided photo is invalid. It doesn't met the requirements.
Yes, maybe. so I wanted to know how to send photo uploaded on firebase storage.
I just worry about this part of photo url.
No idea?
Photos can be sent exactly as described in https://core.telegram.org/bots/api#sendphoto. If the photo is publicly accessible by the URL and meets all other requirements, it can be sent via the URL.
The provided photo is invalid. It doesn't met the requirements.
So, how can I meet with the requirements? https://firebasestorage.googleapis.com/v0/b/parasol-finance-21.appspot.com/o/projects%2F24kn8ifJpEuGmbQP8VmkxeXgjnVi5zXvFQzusgmT3CmD%2F1SP_IDO.png?alt=media&token=fa212a61-6dd9-4c63-9231-2206232c11a0 It can be accessible though right?
The photo's width and height must not exceed 10000 in total.
The photo's width and height must not exceed 10000 in total.
So you mean, its width and height exceeded 10000 in total? How can I adjust it via api? Or maybe need to replace it? But fyi, I cant send all photos of storage.
This is unrelated to Bot API. The error 400 for the provided link is absolutely correct.