Back to Documentation Overview
apikeyExpire
public static apikeyExpire(string username, string password, string apikey)
Expire a Specific API Key. Note that if you expire all of your keys, a new, valid one will be created and returned next time you call login(). 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.
- <?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 {
- }
- <?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){
- }
Examples (2)
download example code[1] mcapi_apikeyExpire.php
[2] xml-rpc_apikeyExpire.php
|
Add New Note
User Contributed Notes for
apikeyExpire |
|---|
| No notes, yet... Will you be the first?? |