Reputation: 81
mailchimp.setConfig({
apiKey: "YOUR_API_KEY",
server: "YOUR_SERVER_PREFIX",
});
Upvotes: 8
Views: 3848
Reputation: 41
The server prefix is the starting part of the endpoint URL. For example, if you are using MailChimp API, you can check your server prefix by clicking this url: https://us19.admin.mailchimp.com/.
The server prefix will change to your server prefix automatically. For me it is us18
.
Hope this helps.
Upvotes: 4
Reputation: 630
You can find the SERVER_PREFIX from your API KEY. To see the SERVER_PREFIX from the API KEY, you can write a single code (PHP) like the following.
$serverPrefix = substr($apiKey,strpos($apiKey,'-')+1);
Upvotes: 0
Reputation: 21
To add to the other comments, it's also the last digits of your API KEY.
Upvotes: 0
Reputation: 137
From the documentation:
To find the value for the server parameter used in mailchimp.setConfig
, log into your Mailchimp account and look at the URL in your browser. You’ll see something like "https://us19.admin.mailchimp.com/"; the us19
part is the server prefix. Note that your specific value may be different.
Upvotes: 10