Retrieve basic account information belonging to the authorized user Account.
curl https://api-sandbox.dwolla.com/accounts/DWOLLA_ACCOUNT_ID \
-H "Accept: application/vnd.dwolla.v1.hal+json" \
-H "Authorization: Bearer DWOLLA_ACCESS_TOKEN"
Chilkat.Rest rest = new Chilkat.Rest();
bool success;
// URL: https://api-sandbox.dwolla.com/accounts/DWOLLA_ACCOUNT_ID
bool bTls = true;
int port = 443;
bool bAutoReconnect = true;
success = rest.Connect("api-sandbox.dwolla.com",port,bTls,bAutoReconnect);
if (success != true) {
Debug.WriteLine("ConnectFailReason: " + Convert.ToString(rest.ConnectFailReason));
Debug.WriteLine(rest.LastErrorText);
return;
}
rest.AddHeader("Authorization","Bearer DWOLLA_ACCESS_TOKEN");
rest.AddHeader("Accept","application/vnd.dwolla.v1.hal+json");
Chilkat.StringBuilder sbResponseBody = new Chilkat.StringBuilder();
success = rest.FullRequestNoBodySb("GET","/accounts/DWOLLA_ACCOUNT_ID",sbResponseBody);
if (success != true) {
Debug.WriteLine(rest.LastErrorText);
return;
}
Chilkat.JsonObject jsonResponse = new Chilkat.JsonObject();
jsonResponse.LoadSb(sbResponseBody);
string v_linksSelfHref;
string v_linksSelfType;
string v_linksSelfResource_type;
string v_linksReceiveHref;
string v_linksReceiveType;
string v_linksReceiveResource_type;
string v_linksFunding_sourcesHref;
string v_linksFunding_sourcesType;
string v_linksFunding_sourcesResource_type;
string v_linksTransfersHref;
string v_linksTransfersType;
string v_linksTransfersResource_type;
string v_linksCustomersHref;
string v_linksCustomersType;
string v_linksCustomersResource_type;
string v_linksSendHref;
string v_linksSendType;
string v_linksSendResource_type;
string id;
string name;
int timezoneOffset;
string type;
v_linksSelfHref = jsonResponse.StringOf("_links.self.href");
v_linksSelfType = jsonResponse.StringOf("_links.self.type");
v_linksSelfResource_type = jsonResponse.StringOf("_links.self.resource-type");
v_linksReceiveHref = jsonResponse.StringOf("_links.receive.href");
v_linksReceiveType = jsonResponse.StringOf("_links.receive.type");
v_linksReceiveResource_type = jsonResponse.StringOf("_links.receive.resource-type");
v_linksFunding_sourcesHref = jsonResponse.StringOf("_links.funding-sources.href");
v_linksFunding_sourcesType = jsonResponse.StringOf("_links.funding-sources.type");
v_linksFunding_sourcesResource_type = jsonResponse.StringOf("_links.funding-sources.resource-type");
v_linksTransfersHref = jsonResponse.StringOf("_links.transfers.href");
v_linksTransfersType = jsonResponse.StringOf("_links.transfers.type");
v_linksTransfersResource_type = jsonResponse.StringOf("_links.transfers.resource-type");
v_linksCustomersHref = jsonResponse.StringOf("_links.customers.href");
v_linksCustomersType = jsonResponse.StringOf("_links.customers.type");
v_linksCustomersResource_type = jsonResponse.StringOf("_links.customers.resource-type");
v_linksSendHref = jsonResponse.StringOf("_links.send.href");
v_linksSendType = jsonResponse.StringOf("_links.send.type");
v_linksSendResource_type = jsonResponse.StringOf("_links.send.resource-type");
id = jsonResponse.StringOf("id");
name = jsonResponse.StringOf("name");
timezoneOffset = jsonResponse.IntOf("timezoneOffset");
type = jsonResponse.StringOf("type");
{
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/accounts/721c463c-c328-4467-882a-f1e5120700b0",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "account"
},
"receive": {
"href": "https://api-sandbox.dwolla.com/transfers",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
},
"funding-sources": {
"href": "https://api-sandbox.dwolla.com/accounts/721c463c-c328-4467-882a-f1e5120700b0/funding-sources",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "funding-source"
},
"transfers": {
"href": "https://api-sandbox.dwolla.com/accounts/721c463c-c328-4467-882a-f1e5120700b0/transfers",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
},
"customers": {
"href": "https://api-sandbox.dwolla.com/customers",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "customer"
},
"send": {
"href": "https://api-sandbox.dwolla.com/transfers",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "transfer"
}
},
"id": "721c463c-c328-4467-882a-f1e5120700b0",
"name": "Chilkat Software, Inc.",
"timezoneOffset": -6.0,
"type": "Commercial"
}