Last Active
Member, Administrator, Moderator


  • mohitag
    Hi Sir,

    Hope you are doing well.

    I am writing to you since the question I posted is stuck in draft since past few days. It is not getting published.

    I am facing some issue connecting to websocket. Here is the error I am getting - "Connection error: 1006 - connection was closed uncleanly (WebSocket connection upgrade failed (403 - Forbidden))"

    I have searched the already existing queries on the same error but the reason seems to be invalid access_token. I have checked multiple times from my end and all the parameters seem to be fine. I have tried it in different IDEs - jupyter notebooks and Visual studio code. I also tried downgrading kiteconnect from 4.1 to 4.0 but nothing seems to be working. I am still getting the same error.

    Other api calls like and kite.profile() are working fine but I am not connecting to websocket. It has been almost 1 week since I subscribed to kite connect. I request your help in resolving this issue. Sharing the code below.
    November 18
  • laxmiprasu2002

    Can you please help me on API bridge between Amibroker and Kite API connect
    November 7
  • IO4946
    Hi Sujith,
    I m getting this error :
    {"status":"error","message":"Invalid user session.","data":null,"error_type":"TokenException"}
    I had seen the links related to this issue but its not solving my problem.
    June 11
    • IO4946
      Please Reply
    • IO4946
      I need help in this plz
    • IO4946
      * I have created the app on kiteconnect.
      * then login to the kiteconnect using api_key and api_secret and got the link.
      * then pasted the above link in chromes incognito mode as well the other browser.
      * login screen appears after that asking userid and password.
      * user id i put same as what i put in my kite.zerodha account , it asks for pin even i give it.
      * after that i get this in the browse is : {"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"}
      and the in url is :

      I dont get any request tokens.
      Please help me.
    • AbhyudayaCodes25
      * after that i get this in the browse is : {"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"}, for your information, I can help you with this message a bit.
      When you were creating the app, you were required to input a user id, you can only with that user id in the login page that opens. If you login from any other user id, it sends this message.
  • akshayt
    Hi Sujith sir,
    I am trying to automate trading on Zerodha, but I keep geting "TokenException: Token is invalid or has expired." error message. Can you please help?
    I've created a discussion around this -

    Please help.

    August 5
  • Tusshar18
    Hi Sujith

    I have enabled the TOPT authentication, but I am not able to login into my using codes, as in auto login, i have to enter the code manually to login into the same

    The login flow is going well through password, but i need to add the TOPT code manually

    when TOPT authentication was made mandatory, I read in the forum, that you just need to replace the pin with the TOPT key, but its not helping

    Need Help
    June 7
  • sagar_yv
  • swarajmotiwale
    Hi sujith,
    is there any way to fetch the historical orders for a users.
    As i read from the previous discussion there is no back office api provided. Any update on that?
    April 13
  • bhupeniitd01
    hi sujith...this is my api key
    April 5
  • Sundar_G
    You can go through login flow FAQs here. ==> Already have set all credential as mentioned in this solution
    January 27
  • Sundar_G
    need it for Expiry Trading, please help urgently
    {"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"}
    I have created two API connection for same Zerodha User Id, First one am able to connect, 2nd one connection is failing, please help
    api_key = 8pxz1hr457b51yxl
    January 27
  • Sundar_G
    {"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"}
    I have created two API connection for same Zerodha User Id, First one am able to connect, 2nd one connection is failing, please help
    api_key = 8pxz1hr457b51yxl
    January 26
  • krishkalyani
    @sujith , Its working in separate threads. Thank you very much
    January 8
  • rubaljhavar
    Hi @sujith, On placing orders through publisher API, some order legs are giving error as "account_id" should be 6 char uppercase. It was working fine since yesterday

    December 2021
  • Kumar_Sunny
    Hi sujith
    November 2021
  • Darchitect

    websocket api freezes and getting connection failed error.
    November 2021
  • vibhavachar
    MV2460' getting invalid token can some one help?
    October 2021
  • Sumansangwan

    hi, can you pls tell me how to get tick data of option chain. pls reply
    October 2021
  • IQ2429
    can you any have sample source code of vb6. to login & placing order by api.

    & how can i get moving average crossover data by api.
    October 2021
  • Vaibhav_singh
    I am trying to create apis for my mobile app in node js and i have downloaded the node js package from github and i am trying to connect my node app with kite connect via functions and i am passing my kite api_key for app. But to create session i also need request token and when i check the documentations where i see i have to login with my zerodha account to get request token. But it expires in few minutes. Is there any process or function where can i pass my parameters and get my request token from my code not from going to zerodha login dashboard process.
    October 2021
  • manavparmar
    Hi Sujith,

    I have kept the instrument tokens of the recent expiry 21909, but when i pass the intrument token it does not fetch data
    September 2021
  • noft The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 403 Forbidden

    Have been getting this error since afternoon of 31 Aug 2021. Have relogined several times and regenerated the token multiple times.
    This isnt going away. Usually it was very infrequent and went away after logging in again.
    What's to be done?
    September 2021
  • rubaljhavar
    Hi Sujith , Need your help on the publisher API issue that I mentioned. It is now occurring very frequently. Need your urgent help here. It is still giving this error 'Error while fetching session. Please reload the page.' On reload of the page it goes away.
    August 2021
  • maheshk3176
    Maximum allowed order requests exceeded.
    how much is allowed?
    August 2021
  • maheshk3176
    raise ConnectionError(e, request=request)
    requests.exceptions.ConnectionError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /instruments/NFO (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
    August 2021
  • Kamalv
    Issue: GeneralException: Couldn't find that `order_id`.
    OrderID# 210818000157782
    CustID# KF8186
    Placing Order at 2021-08-18 09:15:32.504196 (from my end)
    August 2021
  • raviteja546
    Hi Sujith, When i try to extract P&L for intraday positions, i use kite.getPostions() and filter by "day" and trying to take sum of unrealised value, but its not updating live data.. i used 5secs gap to run p&l method but its not giving live value.. Please suggest..
    August 2021
  • nb007
    {"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"} , i am facing this issue i am the single user
    August 2021
  • durgeshpandey215
    $kite = new KiteConnect($zerodha_apikey); // here i have api key

    try {
    $user = $kite->generateSession($zerodha_request_token, $zerodha_secret); // here i have secret key but i don't have request token
    } catch(Exception $e) {
    echo "Authentication failed: ".$e->getMessage();
    throw $e;

    when i run this program with proper input i do not get any response I got error
    August 2021
  • rajat86
    hi sujith
    as you mentioned
    It is mandatory by the exchange that a trader has to log in at least once a day. We don't recommend automating login.

    Can I use kiteconnect python apis to automate trades across days in aws?
    If yes, can you help me with the redirect url i have to give to purchase api access keys etc. What redirect url to give for use in aws?
    June 2021
  • HarshalRathore
    Hello, sujith sir
    I am in a pickle and need you'r help on this
    Now I am going to present a case in front of you
    say, that today I shorted one PE and one CE (attributes order:market, variety:RGLR, validity:day) manually with kite app. Now I want to automate the tracking of the combined premium of this trade with python and when it hits my desired SL I want to square off the trade meaning I want to close both the trade.
    so, what function to use or which method for this. provide me the solution for both cases MIS and NRML product type.
    Thank you
    May 2021