curl --request GET \
--url https://int-data.moneydesktop.com/user \
--header 'MD-SESSION-TOKEN: <api-key>'import requests
url = "https://int-data.moneydesktop.com/user"
headers = {"MD-SESSION-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'MD-SESSION-TOKEN': '<api-key>'}};
fetch('https://int-data.moneydesktop.com/user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://int-data.moneydesktop.com/user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"MD-SESSION-TOKEN: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://int-data.moneydesktop.com/user"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("MD-SESSION-TOKEN", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-data.moneydesktop.com/user")
.header("MD-SESSION-TOKEN", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-data.moneydesktop.com/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["MD-SESSION-TOKEN"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"user": {
"accepted_terms_and_conditions_at": "2020-08-31T16:12:36+00:00",
"birthday": "2011-03-28",
"credit_score": 0,
"email": "fake.email@mxexample.com",
"email_is_verified": false,
"external_guid": "U-201709221210",
"failed_token_login_attempts_count": 0,
"first_name": "John",
"gender": 0,
"guid": "USR-11141024-90b3-1bce-cac9-c06ced52ab4c",
"has_accepted_terms_and_conditions": true,
"has_updated_terms_and_conditions": false,
"is_disabled": false,
"is_restricted": false,
"last_name": "Doe",
"logged_in_at": "2022-07-08T16:28:13+00:00",
"metadata": null,
"phone": null,
"phone_is_verified": false,
"postal_code": "",
"revision": 187
}
}Read user
curl --request GET \
--url https://int-data.moneydesktop.com/user \
--header 'MD-SESSION-TOKEN: <api-key>'import requests
url = "https://int-data.moneydesktop.com/user"
headers = {"MD-SESSION-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'MD-SESSION-TOKEN': '<api-key>'}};
fetch('https://int-data.moneydesktop.com/user', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://int-data.moneydesktop.com/user",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"MD-SESSION-TOKEN: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://int-data.moneydesktop.com/user"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("MD-SESSION-TOKEN", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://int-data.moneydesktop.com/user")
.header("MD-SESSION-TOKEN", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://int-data.moneydesktop.com/user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["MD-SESSION-TOKEN"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"user": {
"accepted_terms_and_conditions_at": "2020-08-31T16:12:36+00:00",
"birthday": "2011-03-28",
"credit_score": 0,
"email": "fake.email@mxexample.com",
"email_is_verified": false,
"external_guid": "U-201709221210",
"failed_token_login_attempts_count": 0,
"first_name": "John",
"gender": 0,
"guid": "USR-11141024-90b3-1bce-cac9-c06ced52ab4c",
"has_accepted_terms_and_conditions": true,
"has_updated_terms_and_conditions": false,
"is_disabled": false,
"is_restricted": false,
"last_name": "Doe",
"logged_in_at": "2022-07-08T16:28:13+00:00",
"metadata": null,
"phone": null,
"phone_is_verified": false,
"postal_code": "",
"revision": 187
}
}Authorizations
MX Session Token
- Request an API token using the read API token endpoint in the MX SSO API.
- Exchange an API token for a session token.
- A session token is obtained by sending a POST request to /sessions
- The session token will be used in each request made for the user. It should be passed in an
MD-SESSION-TOKENHTTP header as shown below. - This session token is valid for 30 minutes from the time it was created. The 30 minute expiration counter is refreshed with each call.
- If you send a request with an expired session token you'll receive an error code of
4011.
curl -i https://int-data.moneydesktop.com/accounts \
-H 'MD-SESSION-TOKEN: CWforZl1Vn2vC_v6H4rnQRT1DoWpDouJAV-_5TBmiQRAtA8rsOG_BoajTiOSsL0A3bd-bmHXlA-eQzc9ywItKg' \
-H 'Content-Type: application/vnd.mx.nexus.v1+json' \
-H 'Accept: application/vnd.mx.nexus.v1+json'
In documentation code examples, replace <API_KEY_VALUE> with the session token.
Response
OK
Hide child attributes
Hide child attributes
The most recent date and time the end user accepted either initial or updated terms and conditions. Represented in ISO 8601 format with a timestamp (e.g., 2015-04-13T12:01:23-00:00).
"2020-08-31T16:12:36+00:00"
Birthdate of user, represented in ISO 8601 format (e.g. 2011-03-28).
"2011-03-28"
Credit score of the user.
0
Email address of the user.
"fake.email@mxexample.com"
If the email is verified, this field will be true. Otherwise, this field will be false.
false
Partner created identifier for the user.
"U-201709221210"
Number of failed login attempts for the user. Defaults to 0.
0
First name of the user.
"John"
Gender of the user. Returns 0 for male and 1 for female.
0
Unique identifier for the user. Defined by MX.
"USR-11141024-90b3-1bce-cac9-c06ced52ab4c"
If the end user has accepted the initial terms and conditions, this field will be true. Otherwise, this field will be false. This field does not update.
true
If updated terms and conditions are available for the end user, this field will be true. This field will return to false when the user has accepted the updated terms.
false
If the user is disabled, this field will be true. Otherwise, this field will be false.
false
If the user is restricted, this field will be true. Otherwise, this field will be false.
false
Last name of the user.
"Doe"
Date and time the user last logged in, represented in ISO 8601 format with timestamp (e.g. 2015-04-13T12:01:23-00:00).
"2022-07-08T16:28:13+00:00"
Additional information a partner can store on the user.
null
Phone number of the user.
null
Verifies the phone for the user. Returns true or false; defaults to false.
false
US ZIP codes and Canadian postal codes are supported. Valid formats are 12345, 12345-6789, A1B2C3, or A1B 2C3.
""
The revision number of this user record.
187

