Hello Please Provide Example I Have Exactly Same This Error !
I Create Session with this method
clienttelegram = new WTelegram.Client(12XXX,"bXXXX",HttpContext.Current.Server.MapPath("/tempkey.session")); string task = Task.Run(async () => await clienttelegram.Login(countrycodeandphone)).Result;
Login Ok Session File Created Successfully !
But When I Resuse Created File Error : WTelegram.WTException: 'Exception while reading session file: The input data is not a complete block.
Use the correct api_hash/id/key, or delete the file to start a new session'
static string Config(string what) { switch (what) { case "api_id": return "12XXXXX"; case "api_hash": return "bd4XXXXXX"; case "phone_number": return "+9891XXXX"; case "verification_code": return ""; case "first_name": return ""; case "last_name": return ""; case "password": return ""; default: return null; } } clienttelegram = new WTelegram.Client(Config, File.Open(HttpContext.Current.Server.MapPath("~/tempkey.session"), FileMode.Open));
Hello Please Provide Example I Have Exactly Same This Error ! I Create Session with this method
clienttelegram = new WTelegram.Client(12XXX,"bXXXX",HttpContext.Current.Server.MapPath("/tempkey.session")); string task = Task.Run(async () => await clienttelegram.Login(countrycodeandphone)).Result;
Login Ok Session File Created Successfully ! But When I Resuse Created File Error : WTelegram.WTException: 'Exception while reading session file: The input data is not a complete block. Use the correct api_hash/id/key, or delete the file to start a new session'static string Config(string what) { switch (what) { case "api_id": return "12XXXXX"; case "api_hash": return "bd4XXXXXX"; case "phone_number": return "+9891XXXX"; case "verification_code": return ""; case "first_name": return ""; case "last_name": return ""; case "password": return ""; default: return null; } } clienttelegram = new WTelegram.Client(Config, File.Open(HttpContext.Current.Server.MapPath("~/tempkey.session"), FileMode.Open));