Anyways, do this: <?php $url = 'https://kite.trade/connect/login?v=3&api_key=' . KITE_CONNECT_API_KEY; header('Location: '.$url);?> User will be sent to the login screen of kite for web. After logging into kite, the server will send the user back to the redirect url which you will give in the dashboard while creating the app. In that script do the following: <?php $access_token = $_GET['request_token'];?> That's it.
the access token is valid till 7:30 am the next day. If the system is asking for access token frequently, then there is either a bug or your code is not optimised.
Anyways, do this:
<?php $url = 'https://kite.trade/connect/login?v=3&api_key=' . KITE_CONNECT_API_KEY;
header('Location: '.$url);?>
User will be sent to the login screen of kite for web. After logging into kite, the server will send the user back to the redirect url which you will give in the dashboard while creating the app. In that script do the following:
<?php $access_token = $_GET['request_token'];?>
That's it.