I am struggling with “api.hubapi.com/deals/v1/deal/” and private apps authentication.
SITUATION
- I’ve tested the call in API tester (similar to Postman) and it works
- the other private apps I use in PHP work
- however, this one in PHP returns this as below. does that mean this API is incompatible with private apps? I don’t see “private apps” listed per se?
FULL PHP CODE LOWER DOWN. many thanks in advance!
“array(4) {
[“status”]=>
string(5) “error”
[“message”]=>
string(56) “Any of the listed authentication credentials are missing”
[“correlationId”]=>
string(36) “c3c1c5f0-0920-48f2-b4d6-c88ab35de98e”
[“engagement”]=>
array(6) {
[“hapikey”]=>
string(60) “hapikey not engaged. hapikey is not present in query params.”
[“oauth-token”]=>
string(72) “oauth-token not engaged. OAuth access token not found in request header.”
[“vendorkey-gae”]=>
string(66) “vendorkey-gae not engaged. Vendorkey not found in request headers.”
[“service-to-service”]=>
string(82) “service-to-service not engaged. Metadata for service-to-service request not found.”
[“app-cookie”]=>
string(65) “app-cookie not engaged. App cookie is not present on the request.”
[“internal-cookie”]=>
string(61) “internal-cookie not engaged. Cookie not found in the request.”
}
}”
PHP code I am using
$authorisation1 = “Authorization: Bearer TOKEN_HERE”;
$ch_inner_properties = curl_init();
curl_setopt($ch_inner_properties, CURLOPT_URL,$url_inner_properties);
curl_setopt($ch_inner_properties, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch_inner_properties, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘Content-Type: application/json’ , $authorisation1 ));
$results_inner_properties = curl_exec($ch_inner_properties);
curl_close($ch_inner_properties);
$results_inner_properties = json_decode($results_inner_properties,true);
var_dump($results_inner_properties);