osparamatrix / ks-orderapi-python

47 stars 59 forks source link

facing issue with OTT session generation #87

Open keerthankumar opened 2 years ago

keerthankumar commented 2 years ago

` url = 'https://tradeapi.kotaksecurities.com/apim/session/1.0/session/2FA/oneTimeToken'

    data = json.dumps({"userid" : cred_content['user_id']})

    headers = { 
        'accept': 'application/json', 
        'oneTimeToken': ott_val, 
        'consumerKey': cred_content['api_key'], 
        'ip': '127.0.0.1', 
        'appId': cred_content['app_id'], 
        'Content-Type': 'application/json', 
        'Authorization': "Bearer "+cred_content['access_token'], 
    } 

    res = requests.post(url, headers=headers, data=data)`

I get error- {"fault":{"code":999024,"description":"https://ctradeapi.kotaksecurities.com/","message":"Request can not be processed, please process your request through provided domain"}}

kalilinux-png commented 1 year ago

are you still facing this issue