Hi, I'm doing a small program to send messages to a telegram but the problem is that I do not receive the messages. The code is as follows:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
using TLSharp;
using TLSharp.Core;
using System.IO;
namespace telegram
{
class Program
{
const int apiId = 85381;
const string apiHash = "3e368f6bc7a6b30844b9e88cc940c151";
const string number = "12067177907";
const int groupId = 376934156;
static void Main(string[] args)
{
var client = new TelegramClient(apiId, apiHash);
client.ConnectAsync();
var hash = client.SendCodeRequestAsync(number);
var code = "55xxx"; // you can change code in debugger
var user = client.MakeAuthAsync(number, apiHash, code);
client.SendMessageAsync(new TLInputPeerUser() { user_id = groupId }, "TEST");
Console.ReadKey();
}
}
}
Here is a capture of my data so you can verify that the data is correct:
Second:
Third:
At least I would have to get a message to my account by entering "Test"
but I do not receive anything. In my case, my application would be a simple extension.
Reference: TLSharp