I am writing to request assistance with an issue I’m facing while trying to generate an Access Token for my Fyers app in JavaScript.
Despite following the Fyers API documentation and verifying my code multiple times, I consistently encounter the following error when making a POST request to the /access-token endpoint:
“Exception: Request failed for https://api.fyers.in returned code 500. Truncated server response: {‘s’: ‘error’, ‘code’: 500, ‘message’: ‘Invalid Request, please provide valid method’} (use muteHttpExceptions option to examine full response)”
I have ensured that the request method is correctly set to POST, and that all the required parameters (grant_type, code, client_id, secret_key, redirect_uri) are included in the request body with the correct values.
The relevant code snippet is in the attached Txt file.
I have tried regenerating the Auth Code and using different variations of the code, but the error persists.
Could anyone please investigate this issue and provide any guidance or suggestions for resolving it?
Thanks for your valuable inputs and for pointing me to the V3 API documentation!
In order to get a new Auth Code, I am now trying to implement the authentication process as per the V3 API, but I am getting a 503 error when I try to access the authorization URL (screenshot below*).
I have checked the Fyers API status page, and no ongoing issues are mentioned.
Could you please advise on what might be causing this error and how I can resolve it?
Thank you again!
*Client code is deliberately changed with placeholder for security purposes.
@117743031955998222903
This error appears to be an issue from Fyers side. Wait for some time and try the process again and check if it is still an issue. It is working fine at my end.
Note : Fyers Status page is a joke. Looks like they manually update incidents there if they see/get any reports