C
C#10h ago
Evgen

Telegram Bot Mindee integration

I'm trying to use a telegram bot to read data from a document. The request is sent, but nothing is returned.
9 Replies
mg
mg10h ago
not sure what kind of help you're expecting to receive with no information and no question
Evgen
EvgenOP10h ago
I don't understand what the problem is. The request is sent, but the data is not returned
mg
mg10h ago
the problem with your program or the problem with your post? you've provided no code. you've provided no details. i don't even know what "the request" is. the request for what? $details
MODiX
MODiX10h ago
When you ask a question, make sure you include as much detail as possible. Such as code, the issue you are facing, what you expect the result to be, what .NET version you are using and what platform/environment (if any) are relevant to your question. Upload code here https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code! (see $code for more information on how to paste your code)
mg
mg10h ago
"a request to read data from a document" is extremely vague
Evgen
EvgenOP10h ago
using Mindee; using Mindee.Http; using Mindee.Input; using Mindee.Parsing; using System.IO; using System.Threading.Tasks; using Mindee.Product.InternationalId; using TelegramBotTZ.Interfaces; namespace TelegramBotTZ.Services { public class MindeeService : IMindeeService { private readonly string _apiKey; public MindeeService(string apiKey) { _apiKey = apiKey; } public async Task<string> ProcessPhotoAsync(Stream photoStream, string filePath) { var mindeeClient = new MindeeClient(_apiKey); string tempFilePath = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}.jpg"); using (var fileStream = new FileStream(tempFilePath, FileMode.Create, FileAccess.Write)) { await photoStream.CopyToAsync(fileStream); } var inputSource = new LocalInputSource(tempFilePath); var response = await mindeeClient .EnqueueAndParseAsync<InternationalIdV2>(inputSource); File.Delete(tempFilePath); return response.Document.ToString(); } } }
mg
mg10h ago
if you're going to continue to put minimal effort into explaining your issue i'm afraid i can't help. good luck
Unknown User
Unknown User10h ago
Message Not Public
Sign In & Join Server To View
abhiroop43
abhiroop438h ago
I have noticed Mindee also provides REST APIs. Perhaps try calling the REST APIs from Postman or any other REST client and see if you are getting the response.

Did you find this page helpful?