I am getting this error GuzzleHttp\Exception\RequestException cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://us20.api.mailchimp.com/3.0/ping every time i go on the website\ping
In .env i have inserted my api key like this:
'MAILCHIMP_KEY=apikey-us20' (didn't put the api key on stackoverflow)
In my route file web.php i have it like this :
Route::get('ping', function () {
$mailchimp = new \MailchimpMarketing\ApiClient();
$mailchimp->setConfig([
'apiKey' => config('services.mailchimp.key'),
'server' => 'us20'
]);
$response = $mailchimp->ping->get();
// $response = $mailchimp->lists->getAllLists();
ddd($response);
});
And in config\services.php
return [
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'mailchimp' => [
'key' => env('MAILCHIMP_KEY')
]
];
If I go to this link https://us20.api.mailchimp.com/3.0/ping
I get :
{"type":"https://mailchimp.com/developer/marketing/docs/errors/","title":"API Key Invalid","status":401,"detail":"Your request did not include an API key.","instance":"6729ff8b-f427-9766-b26f-b77bf83fa68a"}
I am useing wampserver 3.2.3, PHP 7.4.9, Laravel 8.76.2
I don't know how to fix it.