• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

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

Bug Report
2
2
204
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    amit last edited by 26 Oct 2020, 06:35

    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);

    1 Reply Last reply Reply Quote 0
    • devansh-webkul
      devansh-webkul last edited by 27 Oct 2020, 10:10

      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.

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post