Skip to main content

Delete User

Use this endpoint to delete an user. This endpoint accepts the optional MX-SKIP-WEBHOOK header.

DELETE
/users/{user_id}

Path Parameters

FieldRequiredType

user_id

Required
String

Request sample

Language:

_52
import java.io.BufferedReader;
_52
import java.io.InputStreamReader;
_52
import java.net.URL;
_52
import javax.net.ssl.HttpsURLConnection;
_52
_52
public class MDX_RealTime {
_52
private String BaseUrl, ClientId, ApiKey;
_52
_52
public MDX_RealTime(String BaseUrl, String ClientId, String ApiKey) {
_52
this.BaseUrl = BaseUrl;
_52
this.ClientId = ClientId;
_52
this.ApiKey = ApiKey;
_52
}
_52
_52
public static void main(String[] args) throws Exception {
_52
String base_url = "https://int-live.moneydesktop.com";
_52
String client_id = ":client_id";
_52
String api_key = ":api_key";
_52
_52
MDX_RealTime mdx = new MDX_RealTime(base_url, client_id, api_key);
_52
_52
/// Setup IDs
_52
String user_id = "U-39XBF8";
_52
_52
mdx.DeleteUser(user_id);
_52
}
_52
_52
public void DeleteUser(String user_id) {
_52
try {
_52
String uri = BaseUrl + "/" + ClientId + "/users/" + user_id + ".json";
_52
URL url = new URL(uri);
_52
_52
HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
_52
con.setRequestMethod("DELETE");
_52
con.setRequestProperty("Accept", "application/vnd.moneydesktop.mdx.v5+json");
_52
con.setRequestProperty("MD-API-KEY", ApiKey);
_52
_52
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
_52
String inputLine;
_52
StringBuffer response = new StringBuffer();
_52
while ((inputLine = in.readLine()) != null) {
_52
response.append(inputLine);
_52
}
_52
in.close();
_52
con.disconnect();
_52
_52
System.out.println(response.toString());
_52
} catch (Exception e) {
_52
System.out.println(e);
_52
}
_52
}
_52
}

Response sample

204
Language:shell

_10
No Content