-
-
Notifications
You must be signed in to change notification settings - Fork 148
MessagesSendMultiMedia returns rpc error code 400: MEDIA_INVALID when sending multiple media in a single post #1527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
before using MessagesSendMultiMedia you should upload all files to telegram, please check docs before creating a issue https://core.telegram.org/methods |
@borzovplus I checked this and studied the documentation, but I still face the same problem. Have you tried using multiMedia yourself, if you know, can you please show me? |
I can not to show, because I have a lot of abstractions (to much codes). |
func UploadFile(ctx context.Context, client *telegram.Client, filePath string) (tg.InputFileClass, []byte, error) {
} @borzovplus Yes, I am using the same uploader package, but still no result. |
Have you found a solution? @asadbekGo |
no, I still haven't found a solution. If you know a solution, please help @shampigeon |
please help @ernado |
I am trying to send multiple media files (e.g., images) in a single post using MessagesSendMultiMedia, but I keep getting the error:
rpc error code 400: MEDIA_INVALID
_, err = v1.tgBot.Client.API().MessagesSendMultiMedia(context.Background(), &tg.MessagesSendMultiMediaRequest{
Peer: &tg.InputPeerChat{ChatID: groupId},
MultiMedia: []tg.InputSingleMedia{
{
Media: &tg.InputMediaUploadedPhoto{File: inputFile},
RandomID: rand.Int63(),
Message: post.Text,
},
{
Media: &tg.InputMediaUploadedPhoto{File: inputFile},
RandomID: rand.Int63(),
},
},
})
What I Tried:
Questions:
Would appreciate any insights or suggestions. Thanks!
The text was updated successfully, but these errors were encountered: