You must provide a MailChimp API key Error - Laravel MAilChip API

PHP , Laravel

Nicesnippets

95

23-09-2019


Nikhil:

I was following your this tutorial: Laravel 5 mailchimp api integration from scratch with example

giving this error

You must provide a MailChimp API key

Hardik Savani:

Thank you contact us Nikhil

You need to follow step 1.

You require to create MailChimp account and get mailchimp key and on .env file:

MAILCHIMP_API_KEY=API-Key-Here

Nikhil:

Hardik,

In the website tutorial mentioned above, you haven't added the command for publishing the vendor. It wasn't until I looked at the GitHub page where you mention:

Step 3: From the command-line run

php artisan vendor:publish --provider="Skovmand\Mailchimp\MailchimpServiceProvider"

This made the difference for me, as there was no access to the mailchimp api key variable in .env

Great work on this package though!!!