Recent Topics

Orders Api "Route [auth.login] not defined."



  • Below is the my curl call request for get all orders. $access_token is the value which i get from admins table and api_token column. I want to get all orders with admin users token not as customer. please help me on this please let us know if any changes required in below code. (I installed bagisto on wamp server ).

    $url = 'http://localhost/bagisto_fresh/public/api/orders';
    $access_token = 'qu8vfY3xFPHwnOXntTtN65ETCnjRAE8uGwzVlw6SFjCbxpe0qGHFHNLPCovxwXk0HdmxalYhNeC3bfeY';

    $token = $access_token;
    //setup the request, you can also use CURLOPT_URL
    $ch = curl_init($url);
    // Returns the data/output as a string instead of raw data
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    //Set your auth headers
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Authorization: Bearer ' . $token
    ));
    // get stringified data/output. See CURLOPT_RETURNTRANSFER
    $data = curl_exec($ch);
    // get info about the request
    $info = curl_getinfo($ch);
    // close curl resource to free up system resources
    curl_close($ch);
    print_r($data);



  • Hi @amit,

    We don't have an API for admin users. You need to customize this from your end.

    The error you are getting is of unauthorized access. Means you are trying to login admin from customer API.


Log in to reply