Dear good people of Stack. I have a custom PHP web site and would like to ask for help in passing new user's name and emails to my GetResponse list. I currently have a Mailchimp integration, which works great, but would like to rewrite it for GetResponse (Please see the code below).
I've consulted this doc, but couldn't do it: https://apidocs.getresponse.com/v3/case-study/adding-contacts
Could someone please help me modify this to work with GetReponse please? I would be very thankful.
\Unirest\Request::auth('Arsen', 'MAILCHIMP_API_KEY');
$body = \Unirest\Request\Body::json([
'email_address' => $_POST['email'],
'merge_fields' => [
'LNAME' => $_POST['name']
],
'status' => 'subscribed'
]);
\Unirest\Request::post(
'MAILCHIMP_LINK' . '/lists/' . 'MAILCHIMP_API_LIST' . '/members',
[],
$body
);
Thank you in advance!