# New API Using pya3

**URL:** <https://community.aliceblueonline.com/t/new-api-using-pya3/4939>\
**Category:** API\
**Created:** [June 30, 2023, 1:24am UTC](https://community.aliceblueonline.com/t/new-api-using-pya3/4939 "2023-06-30T01:24:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murali\_B](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/murali_b/32/2443_2.png) [@Murali\_B](https://community.aliceblueonline.com/u/Murali_B)\
**Post date:** [June 30, 2023, 1:24am UTC](https://community.aliceblueonline.com/t/new-api-using-pya3/4939/1 "2023-06-30T01:24:56Z")

</div>

I am unable to get connected through API when I am NOT logged in into ‘[Aliceblueonline.com](http://Aliceblueonline.com)’, the ANT Trading web platform.  
However when I am logged in into ‘ANT Web platform’, I am able to establish connection through the new API using the library pya3

Can some one share more information around this, I need to connect to the ANT API and establish connection even when I am not logged into ANT Web platform.

Below is the error message, I have got

‘emsg’: 'Enable/Login with TOTP, to create the session.  
{‘userId’: ‘XXXX’, ‘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}

Thank you

---

<div class="post-metadata">

**Author:** ![nandagopal](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nandagopal](https://community.aliceblueonline.com/u/nandagopal)\
**Post date:** [June 30, 2023, 9:41am UTC](https://community.aliceblueonline.com/t/new-api-using-pya3/4939/2 "2023-06-30T09:41:32Z")

</div>

Yes, every day need to login ant web once, before login to API as per SEBI guide lines.

---

<div class="post-metadata">

**Author:** ![Murali\_B](https://sea1.discourse-cdn.com/flex015/user_avatar/community.aliceblueonline.com/murali_b/32/2443_2.png) [@Murali\_B](https://community.aliceblueonline.com/u/Murali_B)\
**Post date:** [June 30, 2023, 9:38pm UTC](https://community.aliceblueonline.com/t/new-api-using-pya3/4939/3 "2023-06-30T21:38:41Z")

</div>

Thank you, Nandagopal.  
However I disagree, if we take a reference of AlgoTradigng platforms, they do not need the customer to login every day.  
Do we have any option of auto-login without forcing a web login by the user.
