Read User
Use this endpoint to read a user.
GET
/users/{user_id}
Path Parameters
| Field | Required | Type |
|---|---|---|
user_id | Required | String |
Request sample
Language:
_52import java.io.BufferedReader;_52import java.io.InputStreamReader;_52import java.net.URL;_52import javax.net.ssl.HttpsURLConnection;_52_52public 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.ReadUser(user_id);_52 }_52_52 public void ReadUser(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("GET");_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
200
Language:json
_17{_17 "user": {_17 "id": "U-39XBF7",_17 "birthdate": "1959-07-17",_17 "gender": "MALE",_17 "first_name": "John",_17 "guid": "USR-c4321d57a-9ae4-1fe3-6c4e-96a84fb92b50",_17 "last_name": "Smith",_17 "metadata": "Additional Information",_17 "credit_score": 718,_17 "email": "example@example.com",_17 "phone": "(505) 555-1234",_17 "zip_code": "87101",_17 "is_disabled": false,_17 "logged_in_at": null_17 }_17}