I have been struggling trying to figure out this mindbody API for a while now and was hoping someone here had a solution. Because I am going to be working on a clients site, I need to get an activation link to give them. According to the little documentation they have, I need to send a SOAP xml request with a sourcename,password and siteid and it will return an xml statement with the info I need. I have not used SOAP much and have read everything I can find on it. Below is the code I am trying now ( I ahve tried others including using curl). This is very basic but its the best place to start.
$sourceCredentials = array('SourceName'=>'mysourcename', 'Password'=>"mypassword", 'SiteIDs'=>array('12345'));
$client = new SoapClient("https://api.mindbodyonline.com/0_5/SiteService.asmx?WSDL");
$result = $client->__soapCall("GetActivationCode", ($sourceCredentials));
echo "<pre>"; print_r($result); echo "</pre>";
The error I keep getting is
System.NullReferenceException: Object reference not set to an instance of an object. at mb.API._0_5.SiteService.GetActivationCode(GetActivationCodeRequest Request)
I have tried to use Githubs sources as well but have nto been able to find what I need.
Any help is appreciated.
If you’re still having trouble I’m working on writing an article on getting started with the MINDBODY API in under 30 minutes also here’s a link to a tool I created that should get the activation code for you