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"
use chilkat();
$rest = chilkat::CkRest->new();
# URL: https://api-sandbox.dwolla.com/accounts/DWOLLA_ACCOUNT_ID
$bTls = 1;
$port = 443;
$bAutoReconnect = 1;
$success = $rest->Connect("api-sandbox.dwolla.com",$port,$bTls,$bAutoReconnect);
if ($success != 1) {
print "ConnectFailReason: " . $rest->get_ConnectFailReason() . "\r\n";
print $rest->lastErrorText() . "\r\n";
exit;
}
$rest->AddHeader("Authorization","Bearer DWOLLA_ACCESS_TOKEN");
$rest->AddHeader("Accept","application/vnd.dwolla.v1.hal+json");
$sbResponseBody = chilkat::CkStringBuilder->new();
$success = $rest->FullRequestNoBodySb("GET","/accounts/DWOLLA_ACCOUNT_ID",$sbResponseBody);
if ($success != 1) {
print $rest->lastErrorText() . "\r\n";
exit;
}
$jsonResponse = chilkat::CkJsonObject->new();
$jsonResponse->LoadSb($sbResponseBody);
$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"
}