Error On Call To Database - See Admintoken is



Error On Call To Database - See Adminfirstname1=
firstname2=
// security so cannot go directly to this file
Click here to load this Caspio Cloud Database
function get_auth_token() { // get authentication token - code below works to get auth token $caspio_oauth_url = 'https://c0abh680.caspio.com/oauth/token'; $caspio_client_id = 'd6536e1bd4944d35185e5ce68bc62ab4d09164d2faa76637c7'; $caspio_client_secret = '521c2dd6439f4ac89dcf8ab9c034ec1fd12164740b95dc9422'; $auth_rtn = CallAPI('POST', $caspio_oauth_url,'','', 'grant_type=client_credentials&client_id=' . $caspio_client_id . '&client_secret=' . $caspio_client_secret, ''); return $auth_rtn["access_token"]; } function xyz() { // get accounts to dispute for this client echo "entered try it

"; die(); $contractID = 11251; $table_info = '/tables/Accounts/rows'; $url = $_SESSION['caspio_api_url'] . $table_info; // $table_info passed into routine $qry_str = '{"' . 'select":"AccountsID, AcctName, ContractID, LCID, NumExpDisputesSent, CurrentStatusEquifax, CurrentStatusTransUnion, CurrentStatusExperian, AccountTypeID, StartingStatusEquifax, StartingStatusTransUnion, StartingStatusExperian, StartingStatusDTC, ShouldBeStatusEquifax, ShouldBeStatusTransUnion, ShouldBeStatusExperian, ShouldBeStatusDTC, OverrideEqx, OverrideTU, OverrideExp, OverrideDTC","where": "ContractID=' . $contractID . ' AND OkToDispute=' . "'True'" . '"}'; $acctsToDispute = CallAPI("GET", $url, $qry_str, $_SESSION['caspio_headers'], "",""); $numAccts = sizeof($acctsToDispute['Result']); echo "numaccts=" . $numAccts; die(); if ($numAccts>0) { echo $acctsToDispute['Result'][$i]['AccountsID']; die(); } else { echo "did not work"; } } ?> // security so cannot go directly to this file
Click here to load this Caspio Cloud Database