Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mindbody API using php SOAP

Tags:

php

soap

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.

like image 982
Webtect Avatar asked Jul 04 '26 07:07

Webtect


1 Answers

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

like image 179
Devin Crossman Avatar answered Jul 05 '26 21:07

Devin Crossman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!