I was trying to get the positions open via the 'https://api.kite.trade/portfolio/positions/' and it kept returning an error: { "status": "error", "message": "Invalid `api_key` or `access_token`.", "data": null, "error_type": "InputException" }
As soon as I disabled the header 'X-Kite-Version:3', it starting working.
Please update the documentation/update the headers to make them backward/forward compatible. Regards ARsh
As of now, our APIs are backward compatible in terms of URL routes and tokens. Could you please add more information such as which client library you are using? How are you adding the extra header?
The final URL is I am able to reproduce the issue via POSTMAN(https://www.getpostman.com/postman) hence It is not about libraries which I am using. I have attached a screen shot of the postman here for your reference
The final URL should look like 'https://api.kite.trade/portfolio/positions?api_key=&access_token='. Are you sure that this is the case?
As of now, our APIs are backward compatible in terms of URL routes and tokens. Could you please add more information such as which client library you are using? How are you adding the extra header?
I am able to reproduce the issue via POSTMAN(https://www.getpostman.com/postman) hence It is not about libraries which I am using. I have attached a screen shot of the postman here for your reference
As I mentioned in my previous comment the URL route is 'https://api.kite.trade/portfolio/positions'. There is no '/' at the end. Please try removing it.
Yup that was the issue, thanks for the keen eye. But let me assure you, the '/' works without the header X-kite-version:3.
Hence there is a discrepancy somewhere.
regards
ARsh
We have noted this issue. We will be fixing this in next release.