User API \ Delete a user PHP SDK
User API Resources
Resource/URI | GET | POST | PUT | DELETE |
---|---|---|---|---|
Users /users.json
|
List all users |
– | Import from access token | – |
User /users/<user_token>.json
|
Retrieve user details | – | – |
Delete user |
User /users/<user_token>/contacts.json
|
Read user contacts | – | – | – |
User /users/<user_token>/publish.json
|
– | Publish on social networks | – | – |
Workflow
Request: the code to send to the API
Send a DELETE
request to the resource /users/<user_token>.json
to immediately delete an existing user.
The <user_token>
has to be replaced by the unique token of an existing user. This operation cannot be undone.
To prevent you from unintentionally deleting a user by mixing up the DELETE/GET
methods
you have to include the url parameter confirm_deletion=true
in your DELETE
requests.
If you omit this parameter, the user will not be deleted and an error will be thrown.
Result: the code returned by the API
If the user has been deleted successfully, the API will return a HTTP status code 200
.
If the user could not be deleted, the API will return an appropriate message body with further details on the error that occured.