i can't access my custom property via api

Im building a api consumer on my localhost.

I added a custom property to contacts and managed to populate it fine using my localhost api consumer but i cant seem to access that specific property. Below is my code - I can access all other properties just not the custom one.

$hubspot = \SevenShores\Hubspot\Factory::create(‘e5ee3461-4eda-46e7-969e-6d2d2e423b84’);

$test = array();
// $test = $hubspot->contacts()->all();
$hubspot_data_raw = $hubspot->contacts()->all();

Hello @ivan3

While fetching contact(s), HubSpot API only returns some basic properties in the response, not all the properties that a contact holds. If you need to get any specific property, you need to specify that in the parameter.

https://developers.hubspot.com/docs/methods/contacts/get_contacts

Hope this helps.

Thanks

ok thanks and i see there is no php code snippet for this functionality is that right? never mind ill just use file_get_contents() and the get url. My next question is - how do i ask for multiple properties? oh never mind i see “May be included multiple times.”

@ivan3

just in the request url of an API call, you need to append it like:
&property=X&property=Y…
where X and Y are the property names that you want to get.