gotgproto icon indicating copy to clipboard operation
gotgproto copied to clipboard

Error in connecting the client with pyrogram session

Open xD-Mohamed opened this issue 1 year ago • 1 comments

i'm trying to connect the client with a pyrogram session and i keep getting ' Enter Phone Number: ' in the terminal why is that

cl, err := gotgproto.NewClient( apiID, apiHash, gotgproto.ClientType{Phone: ""}, &gotgproto.ClientOpts{ InMemory: true, DisableCopyright: true, Session: sessionMaker.PyrogramSession(session), }, )

I wish u make it return an error if there's error in the session not tell me to Enter Phone Number. That will be better.. Thank you

xD-Mohamed avatar Jul 16 '24 17:07 xD-Mohamed

Hey @xD-Mohamed! Really sorry for the late reply. I have investigated this issue and it seems like problem is with your pyrogram session, are you sure it is correct?

Also, the library includes a parameter to disable automatic login interactive auth provider. Just set NoAutoAuth to true in ClientOpts and library will start sending an error rather than prompting you to fill a mobile number.

celestix avatar Jul 21 '24 20:07 celestix