If I execute this in terminal:
curl -X POST https://<ds>.api.mailchimp.com/3.0/lists/<list_id>/members?skip_merge_validation=true --user "anystring:<APP_KEY>" -d '{"email_address":"testemail@example.com","email_type":"text","status":"subscribed","merge_fields":{},"interests":{},"language":"","vip":false,"location":{"latitude":0,"longitude":0},"marketing_permissions":[],"ip_signup":"","timestamp_signup":"","ip_opt":"","timestamp_opt":"","tags":[]}'
User is successfully added. But when I try in my laravel app, like the mailchimp documentations says here, I got an error Bad Request 400 and can't actually see it because laravel truncates it in the error log. My laravel code looks like this:
$mailchimp = new \MailchimpMarketing\ApiClient();
$mailchimp->setConfig([
'apiKey' => APP_KEY',
'server' => SERVER
]);
$response = $mailchimp->lists->addListMember('88b0ab829e', [
"email_address" => "example@example.com",
"email_type" => 'text',
"status" => "pending"
]);
print_r($response);