# private apps authentications

**URL:** <https://community.hubspot.com/t/private-apps-authentications/66188>\
**Category:** APIs & Integrations\
**Created:** [September 29, 2022, 4:32pm UTC](https://community.hubspot.com/t/private-apps-authentications/66188 "2022-09-29T16:32:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![L\_P](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/l_p/32/29368_2.png) [@L\_P](https://community.hubspot.com/u/L_P)\
**Post date:** [September 29, 2022, 4:32pm UTC](https://community.hubspot.com/t/private-apps-authentications/66188/1 "2022-09-29T16:32:00Z")

</div>

I am struggling with “[api.hubapi.com/deals/v1/deal/](http://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);

---

<div class="post-metadata">

**Author:** ![skimura](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@skimura](https://community.hubspot.com/u/skimura)\
**Post date:** [September 30, 2022, 9:50am UTC](https://community.hubspot.com/t/private-apps-authentications/66188/2 "2022-09-30T09:50:43Z")

</div>

[@L\_P](https://community.hubspot.com/t5/user/viewprofilepage/user-id/208437)

Hi.

Is the variable “$ch” below a typo for “ch\_inner\_properties”?

```lia-code-sample
// before
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorisation1 ));
// after
curl_setopt($ch_inner_properties, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorisation1 ));

```

---

<div class="post-metadata">

**Author:** ![L\_P](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/l_p/32/29368_2.png) [@L\_P](https://community.hubspot.com/u/L_P)\
**Post date:** [October 3, 2022, 5:10am UTC](https://community.hubspot.com/t/private-apps-authentications/66188/3 "2022-10-03T05:10:49Z")

</div>

Thank you so much, what a stupid mistake of mine! Yes that has fixed it!
