Due to Hurricane Florence’s impact on South Carolina, ACS Technologies is suspending normal operations on Thursday, September 13th at 12:00 PM EDT - Friday, September 14th. All of our systems and backups are fully functional. Our support department will reopen as soon as it is safe to do so. Thank you for the privilege to serve your ministry. 

Page tree

Overview

This quick start tutorial is intended for developers who are familiar with PHP, SOAP, and want a quick "hello world" example for connecting to and using the Access ACS API web service.

This quick start will help you do the following:

  • Connect you to the Access ACS web service
  • Get the login token that is required for make further calls
  • Run one call to getStatAges as a test

Requirements

Note:  NuSOAP is required because PHP's SOAP possibly has a bug preventing it from dealing with Windows server.  PHP5 seems to be missing values .

Source Code

Download and install the NuSOAP library and have it under the 'lib' folder.

 // Access ACS
$accessACS = "https://secure.accessacs.com/acscfwsv2/wsca.asmx?WSDL";
$secid = "xxxxxxxx your security id here xxxxxxx";
$siteid = yyyyy;

// Show all the errors
error_reporting(E_ERROR);

// Create NuSoap client
include("lib/nusoap.php");
$client = new nusoap_client($accessACS, 'wsdl');

// Exit on an error
$err = $client->getError();
if ($err) {
	echo 'Constructor error:' . $err;
	exit();
}

// Get our token
$output = $client->call("getLoginToken", array('secid' => $secid, 'siteid' => $siteid));
print_r($output);
$token=$output['getLoginTokenResult'];
print "Our TOKEN:".$token;


// Do a quick test.
$output = $client->call("getStatAges", array('token' => $token));
print_r($output);