Can we get the deals against the organization using api?

can we get the deals against the organization using api?

If you mean the deals linked to an organization, yes: https://developers.pipedrive.com/docs/api/v1/#!/Organizations/get_organizations_id_deals

how can we get in api (https://github.com/IsraelOrtuno/pipedrive)…?

I don’t think that library allows you to that.
You can make a normal CURL or Guzzle request.

ok if i am making simple curl request on (https://api.pipedrive.com/v1/organizations/$orgid/deals) on this
and if i am sending the accesstoken of my current authorized user will it return that particular user’s deals etc or there is other way to approach it @dani?

$url = “https://api.pipedrive.com/v1/organizations/2/deals”;
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_CUSTOMREQUEST, "GET");
//curl_setopt($ch, CURLOPT_GET, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization:Bearer ".$token,
    "Content-type: application/json"));

//echo 'Sending request...' . PHP_EOL;

$output = curl_exec($ch);

curl_close($ch);

{“success”:false,“error”:“unauthorized access”,“errorCode”:401}"
This return un authorize access, @dani

Make sure you’re contacting
https://api-proxy.pipedrive.com/organizations/{id}/deals
and that the access_token is still valid.

If it’s expired, you’ll have to request a new one using the refresh_token.