Hi, I am calling this function after getting my request token, $user = $kite->generateSession("request_token_obtained", "XXXXXXXXXXX"); It is always giving this error "Token is invalid or has expired".
For creating API, I have connected zerodha funds for paying API charges, money was deducted multiple times. I have raised the complaint to get the non used funds, after getting the funds only it is not working. It is working before that perfectly. I have not changed anything in the code.
Ok sure, I will hide. After redirecting to my page, I am getting the request token, immediately I am calling generateSession function, that time itself it says Token is invalid or expired. It is not being for even 30 seconds .
Are you actually passing the request token obtained from the url in the generate_session function?? Or are you literally passing the string "request_token_obtained" instead of the value of request token ??
$user = $kite->generateSession("request_token_obtained", "XXXXXXXXXXX"); It is always giving this error "Token is invalid or has expired".
You won't get 403 unless you are sending the wrong access_token, api_secret, or request_token(obtained after the login flow). You need to recheck on all these three params at your end. Also, make sure all the tokens are passed as string.
Right now I am using old KiteConnect. Should I use composer kiteconnect ? Whether this makes the conflict. I have checked all the params are correct in my end.
1.include_once( "kiteconnect.php"); 2.$req = isset($_GET['request_token']) ? $_GET['request_token'] : ''; 3.$kite = new KiteConnect("apicode"); I have created a sample code for testing, even this it cause error code 500 if i execute 3rd line. I am using old kiteconnect.
Using old versions and asking for help is not right. When you use latest versions and then you have a issue related to KiteConnect,you may post on this forum.
Old kiteconnect PHP client will work fine for basic API requests, but recent API additions like(basket margin, etc) won't be available in the same. So, it's recommended to use the latest composer package.
I have created a sample code for testing, even this it cause error code 500 if i execute 3rd line. $kite = new KiteConnect("apicode");
It was working fine until API funds credited back to me due to multiple times deducted. Can I delete my existing API key and create new one. I have 20 days more with this API. Shall I delete and create new one ?
With the example given in the above thread, I have tried when I connect with the API Key, it gives error 500. That's why I am asking to delete this API and creating new one ?
I am getting this message when I run in debug mode {"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"}
After redirecting to my page, I am getting the request token, immediately I am calling generateSession function, that time itself it says Token is invalid or expired. It is not being for even 30 seconds .
Whether this makes the conflict.
I have checked all the params are correct in my end.
2.$req = isset($_GET['request_token']) ? $_GET['request_token'] : '';
3.$kite = new KiteConnect("apicode");
I have created a sample code for testing, even this it cause error code 500 if i execute 3rd line.
I am using old kiteconnect.
Can I delete my existing API key and create new one. I have 20 days more with this API.
Shall I delete and create new one ?
That's why I am asking to delete this API and creating new one ?
{"status":"error","message":"The user is not enabled for the app.","data":null,"error_type":"InputException"}