Getting None on GenerateSession
-
obj=SmartConnect(api_key="your api key")
data = obj.generateSession("Your Client ID","Your Password")
refreshToken= data['data']['refreshToken']
print (data)
After entering correct API key , user ID and password , Above command returns None for data. not able to get token. -
@admin Sir.
My client code is G56384. -
@Govind said in Getting None on GenerateSession:
Still getting
Password or Userid is incorrect or expiredPlease share your client code
-
@rajanprabu Yes. I changed password in web.
-
did u try changing your password in web portal ?
-
@rjbanna Hello Sir,
I tried with regenerated API_KEY. I have checked and verified all credentials (API_Key , client code and password).Still getting
Password or Userid is incorrect or expired . And data as None.
Kindly help. -
@Govind I tried your code and it's working fine. I am able to get data. Please double check all the credentials and regenerate the API_KEY if possible.
-
@admin Dear Sir ,
Please find below the extract from my code. (Only replaced password with ****.package import statement
from smartapi import SmartConnect
#from smartapi.smartConnect import SmartConnect
import smartapi.smartExceptions#create object of call
obj=SmartConnect(api_key="EDaaRIB4")
#obj=SmartConnect(api_key="dqsR8Ay7")#login api call
data = obj.generateSession("G56384","**********")
#refreshToken= data['data']['refreshToken']
print (data)#refreshToken= data['refreshToken']
#fetch the feedtoken
feedToken=obj.getfeedToken()
print(feedToken)
#fetch User Profile
#userProfile= obj.getProfile(refreshToken) -
@Govind said in Getting None on GenerateSession:
After entering correct API key , user ID and password , Above command returns None for data. not able to get token.
HI @Govind , please share the extract from your code