TradingAPIs icon indicating copy to clipboard operation
TradingAPIs copied to clipboard

Invalid Session

Open KrishDCoder opened this issue 5 years ago • 2 comments

Hi,

I am facing issue with Vendor Login as it always says "Invalid head parameters.". I cross-checked multiple times and found no issue with "head" or "headers". I am not sure why I am not able to login. Since there are another option as Customer Login, I tried that and I am able to get successful response. I had to change the code a little. Instead of post_data = json.loads(requests.body), I modified it to post_data = json.loads(requests.body)['body'] Even after successful login, I am getting "Invalid Session" response from MarketFeed and also from MarginV3. I didn't try others. Please help me resolve this.

Thanks, Krishna

KrishDCoder avatar Dec 21 '20 14:12 KrishDCoder

Hi..!!! The invalid session error occurs due to cookie or Ocp-Apim-Subscription-Key. The cookie is generated post successful login and the Ocp-Apim-Subscription-Key is provided to you along with the API credentials. Please check if you are able to pass these two while sending the request for Market Feed and Margin API.

api-iifl-securities avatar May 23 '21 20:05 api-iifl-securities

Not working even with cookie & Ocp-APM.. sent.

ajay0447 avatar Dec 26 '23 12:12 ajay0447