apikeyExpire(string username, string password, string apikey)
Expire a Specific API Key. Note that if you expire all of your keys, just visit your API dashboard to create a new one. If you are trying to shut off access to your account for an old developer, change your MailChimp password, then expire all of the keys they had access to. Note that this takes effect immediately, so make sure you replace the keys in any working application before expiring them! Consider yourself warned...
| Section | Security Related |
|---|
| Parameters | |
|---|---|
| username | Your MailChimp user name |
| password | Your MailChimp password |
| apikey | Any valid API Key that you wish to expire |
| Returns | |
|---|---|
| boolean | true if it worked, otherwise an error is thrown. |
[1] mcapi_apikeyExpire.php
<?php /** This Example shows how to expire an API key using the MCAPI.php class and do some basic error checking. **/ require_once 'inc/MCAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $retval = $api->apikeyExpire($username, $password); if ($api->errorCode){ } else { } ?>
[2] xml-rpc_apikeyExpire.php
<?php /** This Example shows how to test a List Segment for use with a new campaign using XML-RPC. Note that we are using the PEAR XML-RPC2 client and recommend others do as well. **/ require_once 'XML/RPC2/Client.php'; require_once 'inc/config.inc.php'; try { $result = $client->apikeyExpire($username,$password,$apikey); } catch (XML_RPC2_FaultException $e){ } ?>