I get a 400 Bad Request when I do the Guzzle request, its the first time using Laravel, Guzzle and Mailchimp so I'm close to bite my fingers off. I don't understand what I'm doing wrong on this one. Can somebody help me?
$mailchimp = new Client(['base_uri' => 'https://us14.api.mailchimp.com/3.0/']);
$checkEmail = $mailchimp->request('POST', 'lists/ID/members/', [
'headers' => [ 'Authorization' => 'apikey ' . config('globals.mailchimp_key') ],
'json' => [
'email_address' => $this->email,
'status' => 'subscribed'
]
]);
return $checkEmail;