Getting Invalid Session ID Error after Successful obtaining request token on 07/01/2020

Getting Invalid Session ID Error on generating access token after Successful obtaining request token, But same code working for me,a day before.
  • rakeshr
    Can you re-check, if you are entering the correct request_token to generate access_token?
    Also, once request_token is used to generate an access token. Request token expires immediately after that. And it cannot be reused further, make sure you are not re-using the same.
  • AnkurGoyal
    I know that request token cann't be reused.
    But the same code was working a day before.
  • rakeshr
    Can you paste your code here? We will look to it.
  • AnkurGoyal
    $apikey = 'xxxxxxxx';
    $secret = 'xxxxxxxx';
    include "kiteconnect.php";
    $kite = new KiteConnect($apikey);
    if (isset($_SESSION['Access'])) {
    $Access = $_SESSION['Access'];
    if ( !isset($_GET['request_token']) ) {
    $request = $_GET['request_token'];
    try {
    $user = $kite->generateSession($request, $secret);
    $Access = $user->access_token;
    $_SESSION['Access'] = $Access;
    } catch(Exception $e) {
  • sujith
    Can you paste the complete stack trace here?
    This query is still not clear.
Sign In or Register to comment.