APIs & Integrations

product_fer
Teilnehmer/-in

500 error when trying to create a contact

lösung

Here's the response I received.  Would appreciate your help

 

{"status":"error","message":"internal error","correlationId":"8a69d9e2-de63-4b5e-bc16-94eb9d933c4b"} 

 

I tried these two endpoints and received the same error:

From https://developers.hubspot.com/docs/methods/contacts/create_contact

0 Upvotes
1 Akzeptierte Lösung
product_fer
Lösung
Teilnehmer/-in

500 error when trying to create a contact

lösung

I was able to fix this issue by passing in the Content-Type string in the headers array in this way:

 

$res = $client->request('POST', $endpoint, [
'body' => $post_json,
'headers' => [
'Content-Type' => 'application/json'
]
]);

Lösung in ursprünglichem Beitrag anzeigen

1 Antwort
product_fer
Lösung
Teilnehmer/-in

500 error when trying to create a contact

lösung

I was able to fix this issue by passing in the Content-Type string in the headers array in this way:

 

$res = $client->request('POST', $endpoint, [
'body' => $post_json,
'headers' => [
'Content-Type' => 'application/json'
]
]);