APIs & Integrations

Polou
Member

Get contact by mail - no body

Hello,

I’m trying to get informations of a specific contact.
Using Guzzle :
$client = new Client();

$request = new \GuzzleHttp\Psr7\Request('GET', "https://api.hubapi.com/contacts/v1/contact/email/test.test@test.com/profile?hapikey=fake_for_example", ['Content-Type' => 'application/json', 'Accept' => 'application/json' ] );

$response = $client->send($request);

This is what i get as response :

2017-10-23 15_56_03-localhost_crm-v2_public_company_leads

Where is the body ? :frowning:

Can you help me, please ?

ps : same if i delete headers from request.

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Get contact by mail - no body

Hi @Polou,

If you’re receiving a 200 status code, then then contact JSON should be included in the body of the response. While I’m not familiar with Guzzle, could you try echoing the response body using a body method (maybe echo $response->getBody();)?

0 Upvotes