hi, trying to save the refresh token and revalidate it for further use but it gives error of
{'code': -16, 'message': 'Could not authenticate the user', 's': 'error'}
here is my code
url = 'https://api-t1.fyers.in/api/v3/validate-refresh-token'
data = {"grant_type":"refresh_token",
"appIdHash":appidhash,
"refresh_token":refresh_token,
"pin":pin}
response = requests.post(url, json = data)
try:
access_token=response["access_token"]
return access_token
except:
print(response)
created appidhash buy converting “app_id:secret_key” into sha256.
Is this the correct way? is there built-in method to do this validation instead without using requests?