M4 API user delete
From Kolmisoft Wiki
Jump to navigationJump to search
Description
M4 API User delete
Usage
- Call: /api/user_delete
- Methods: POST, GET(if allowed, not recommended)
Parametres
- user_id - User ID in M4 database, whose data we want to delete. Required.
- u - username for authentication. Required.
- hash - SHA1 hash constructed using user_id and API_Secret_Key ( More described in Constructing hash). Required.
Request
We send:
HTML POST: http://<SERVER_IP>/billing/api/user_delete?u=admin&user_id=12&&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <status>User deleted</status> </page>
Errors
- <error>User was not found</error> - User was not found. Use correct user id.</error>
- <error>Cannot delete user - it has DIDs</error>
- <error>Cannot delete user - he has some calls</error>
- <error>Cannot delete User - he has Invoicess</error>