Login fails - invalid host

sukantk
I am trying to get accesss token by following the steps here -
https://kite.trade/docs/connect/v3/user/#logout


Url - https://kite.trade/connect/login?v=3&api_key=wxxxxxxxx

Response -
{"status":"error","message":"invalid host","data":null,"error_type":"GeneralException"}
  • sukantk
    Can you share java implementation for this? Thanks
  • sukantk
    Thats what I am trying to understand. Do I need to go to the browser to get the access token. Here there is no implementation to get access token programatically.
  • rakeshr
    @sukantk
    Yes, you need to compulsory go to the browser to obtain request_token, there is no programmatically way to obtain request_token. Then you need to post request_token along with api_key and api_secret, to obtain access_token.
    Generate access_token once and use it throughout the day, for all API calls.
  • sukantk
    sukantk edited August 2018
    When you follow the steps and go to browser, I get this error

    {"status":"error","message":"invalid host","data":null,"error_type":"GeneralException"}

    This is my url - https://kite.trade/connect/login?api_key=xxxxx&v=3
  • sujith
    Are you trying this locally?

    It is mandatory by the exchange that a trader has to log in manually at least once a day. We don't recommend automating login.
  • sukantk
    sukantk edited August 2018
    Yes, I am trying this locally. On my browser. Tried both chrome and safari. Getting same error in both cases
  • sukantk
    Can I get some contact number and get my doubts clarified?
  • sujith
    We don't provide telephone support for Kite Connect. You can write on the forum.

    The error message invalid host in general shows up when client couldn't connect to server.

    You can make a video and send it in a private message. We can take a look at this.
  • sujith
    We also tried to open the login page with your api_key. We were able to see your app's login page.
  • sukantk
    Here is the video -
  • sukantk
    Even I can see the login page. I am getting the error after I enter the credentials and login is successful. I get the error after 2FA
  • sujith
    After a successful login user will be redirected to the endpoint which is specified in the developers console.
    You can just read the URL for the request token after the login.
  • sukantk
    After successful login I am getting this response

    {"status":"error","message":"invalid host","data":null,"error_type":"GeneralException"}

    and redirected to this url - https://kite.zerodha.com/connect/login?api_key=w7juflxxxxxxx&sess_id=hvHfBZ81fkrH78jBQqP7TBZslK1iWWUI&skip_session=true

    Please provide a solution. I can read whatever you have written above in the docs but thats not working for me.
  • sukantk
    PFA complete flow video. I was able to login successfully. Even on my dashboard apps section I can see my app added

  • HowUTrade
    @sukantk
    What is your Redirect_Url?
  • sujith
    It seems like you have given an invalid URL in the Redirect URL field, you can check the description below redirect URL box on the app details page of the developers console, your URL needs to start with https://www.website.com but you seem to have given www.website.com
Sign In or Register to comment.