401 - Unauthorized

hi, all of the sudden i started to get 401 - Unauthorized error from my python API, usually when it happens i 'll just login to my aliceblue account from browser then thie error 'l solved, but this time i tried that but no use, i even regerated my api 2 times, still getting the same API error

    alice = Aliceblue(user_id='my_id',api_key='my_key')
    print(alice.get_session_id())
    print(alice.get_profile()) # get profile

Kindly recheck it’s working fine.

Hi sir, it started to work on the next day, i didn’t even changed any code but it automatically works, now i’m having the same problem once again bro, started to show unauthorized error all of the sudden once again, i logged in to my dashboard even i regenerated my api key but no luck

{‘userId’: ‘942059’, ‘userData’: None, ‘encKey’: None, ‘apikey’: None, ‘stat’: ‘Ok’, ‘emsg’: ‘Enable/Login with TOTP, to create the session.’, ‘loginType’: None, ‘version’: None, ‘fcmToken’: None, ‘imei’: None, ‘login’: False}
{‘stat’: ‘Not_ok’, ‘emsg’: ‘401 - Unauthorized’, ‘encKey’: None}

it started to works again now, tnk u