Hi @saurabh1207 it is constructed in such a way that you have to pass the client id password to generate the token.You dont need api secret key to generate session. Kindly refer below link:
https://smartapi.angelbroking.com/topic/1194/basic-smartapi-integration-using-python