Syntax
bool deleteUser( string api_key, int account_id, int user_id );
Parameters
api_key
(string)The key required to access the API. See Getting Started for more information.
account_id
(int)The User's Account ID.
user_id
(int)The ID of the User to delete.
Return Value
Returns true on success.
Examples
The code below deletes Account User 456789 from Account 123456.
$api = new Api($url, 'YOURAPIKEY');
$session_details = $api->invokeMethod('deleteUser', 123456, 456789);
$session_details = $api->invokeMethod('deleteUser', 123456, 456789);
{
"id": 1,
"method": "deleteUser",
"params": [
"YOURAPIKEY",
123456,
456789
]
}
"id": 1,
"method": "deleteUser",
"params": [
"YOURAPIKEY",
123456,
456789
]
}
{
"id": 1,
"result": true,
"error": null
}
"id": 1,
"result": true,
"error": null
}
Error Codes
This method may return the following error codes in addition to the standard error codes:
Code | Error | Description |
---|---|---|
321 |
Administrative access denied | Account Owner or Account User are not under your Account. |
331 |
Username unavailable | Account User ID is incorrect. |