404 Error In Api Request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhilash.kumar.niit
    Member
    • Sep 2024
    • 44

    404 Error In Api Request

    Hi i am using the api user to get the related records but it is giving me 404

    $client = new Client('https://domain.com/');
    $client->setApiKey($token);
    $qafId = $request->qualityAuditFormId;
    try{
    $response = $client->request(Client::METHOD_GET, "CQualityAuditForm/{$qafId}/qualityAuditFormParameters",[
    'maxSize' => 10,
    'orderBy' => 'createdAt',
    'order' => 'desc',
    'primaryFilter' => 'open',
    ]);
    }catch(\Exception $e){
    return response()->json([
    'response_code'=>$e->getCode(),
    'header'=>$e->getResponse()->getHeadersPart()
    ]);
    }
    $parsedBody = $response->getParsedBody();

    i have tried all the things but not worth can anyone help?
    Last edited by abhilash.kumar.niit; 03-07-2025, 03:39 AM.
  • abhilash.kumar.niit
    Member
    • Sep 2024
    • 44

    #2
    The issue is Solved now.

    Comment


    • lazovic
      lazovic commented
      Editing a comment
      The EspoCRM community will be grateful if you share the solution to the problem that has arisen.
  • abhilash.kumar.niit
    Member
    • Sep 2024
    • 44

    #3
    $client = new Client('https://domain.com/');
    This line is incorrect in my case i just removed the "/" from last and it started working.

    $client = new Client('https://domain.com');

    Comment

    Working...