Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions test/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
from SmartApi.smartConnect import SmartConnect
import pyotp

api_key = 'Your Api Key'
username = 'Your client code'
pwd = 'Your pin'
smartApi = SmartConnect(api_key)
api_key = 'BntudJFe'
username = 'G90000'
pwd = '2004'
smartApi = SmartConnect(BntudJFe)

try:
token = "Your QR value"
totp = pyotp.TOTP(token).now()
totp = pyotp.TOTP(OWJHJM2PM6TEBNN4QJUBT7XP7A).now()
except Exception as e:
logger.error("Invalid Token: The provided token is not valid.")
raise e

correlation_id = "abcde"
data = smartApi.generateSession(username, pwd, totp)
if data['status'] == False:
Expand Down