How do I reuse the refreshtoken without having to generate it throughout the day whenever I want to use the API?
-
How do I reuse the refreshtoken without having to generate it throughout the day whenever I want to use the API?
Currently I am generating token every time I have to use the API. -
@admin this link is not working: https://github.com/angelbroking-github/smartapi-python . I really dont know why your links are not working. blogs are really not helping with such broken link,
- topic:timeago_earlier,3 years
-
Hi @s4ntosh please go through the doc or examples in python sdk:
https://github.com/angelbroking-github/smartapi-python
https://smartapi.angelbroking.com/docs/Orders -
for ordering
obj = SmartConnect(api_key=api_key) obj.setAccessToken(access_token) resp = obj.getProfile(refreshToken)
for web sockets
ss = WebSocket(feed_token, client_code)
-
@rajanprabu Can you please provide a code snippet for python? I tried but I am still getting the following response:
{'success': False, 'message': 'Invalid Token', 'errorCode': 'AG8001', 'data': ''}
-
You can use
client.setAccessToken(access_token)
attribute