Hi Team, i am Not able to generate access token using refresh token today. Till yesterday, everything worked fine. but it is failing since morning. I tried regenerating refresh token with new auth code , deleting the api app and recreating new api app in the console. Also i tried updating the current fyers python package. Attaching error and sample code.
Error:
JSON Response {'s': 'error', 'code': -371, 'message': 'Please provide sha256 hash of appId and app secret'}
Sample code:
import requests
import json
url = "https://api-t1.fyers.in/api/v3/validate-refresh-token"
headers = {"Content-Type": "application/json; charset=utf-8"}
data = {
"grant_type": "refresh_token",
"appIdHash": 'appHash of client_id+secret_id',
"refresh_token": 'refresh_token',
"pin": "pin"
}
response = requests.post(url, headers=headers, json=data)
print("Status Code", response.status_code)
print("JSON Response ", response.json())
Also as a work around, when i create access token by generating new auth code, still not able to generate market live data. Throwing below error:
Error: {'code': 12001, 'message': 'Mode change failed', 's': 'error'}
Error: {'type': 'sub', 'code': 11011, 'message': 'subscription failed', 's': 'error'}
Please let me know if something is wrong with my account.