Forget login issue


  • from smartapi.smartWebSocketV2 import SmartWebSocketV2
    from smartapi import SmartConnect
    import pyotp

    def angelbrok_login():
    try:
    global feed_token, client_code, angel, password, totp

    	angel = SmartConnect(api_key="")
    	client_code = " "
    	password = " "
    	qrOtp = " "
    	totp = pyotp.TOTP(qrOtp)
    	totp = totp.now()
    
    	data = angel.generateSession(client_code,password,totp)
    	refreshToken = data['data']['refreshToken']
    	feed_token = angel.getfeedToken()
    	print("Login successful")
    except Exception as e:
    	print("Error in login", e)
    

    Note: once you login successfully, do not try to generate again,
    who will resolve my "In on pong function==> b'\x00'" issue ?