The sendPhoto command require an argument photo defined as InputFile or String.
The API doc tells:
Photo to send. You can either pass a file_id as String to resend a photo
that is already on the Telegram servers, or upload a new photo using
multipart/form-data.
And
InputFile
This object represents the contents of a file to be uploaded. Must be
posted using multipart/form-data in the usual way that files are
uploaded via the browser.
2
Answers
I’m not a C# Developer but I generated this code using Postman, it uses RestSharp lib
Just tweak it and it should work.
here is a working, parametrized code sample: