Reading list Switch to dark mode

    How to provide third party access to Opencart admin section

    Updated 30 December 2017

    In this blog we will learn how to get access into the admin section of Opencart after requesting for token from third party.

    When we request from any admin controller we have a admin controller URL like http://example.com/admin/index.php?route=extension/module/account&token=XdxaPq4y49L7yWDso8ZmIF6yFm0T1Rvh  and when we get the token and callback, URL changes to http://example.com/admin/index.php?route=extension/module/account&token=XdxaPq4y49L7yWDso8ZmIF6yFm0T1Rvh by which we redirect to login page as invalid token session.

    To overcome with this issue we can simply write like this on that controller after getting token

    $location = str_replace('&', '&', $this->url->link('extension/module/account','token=' . $this->session->data['token'], true));
     header('Location: '.$location);

    So here we ends with this blog.

    Searching for an experienced
    Opencart Company ?
    Find out More

    Thanks

    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home