salesforce-marketingcloud/FuelSDK-PHP

How to persist authorization from page to page

Opened this issue · 0 comments

Regarding the ET_Client class the Read Me on the home page states:

In order to leverage the advantages this class provides, use a single instance of this class for an entire session. Do not instantiate a new ET_Client object for each request made.

I have successfully connected, but when I try to pass the $client object in a session variable, I get this error

SoapClient::__soapCall(): supplied argument is not a valid sdl resource

Apparently it's not possible to pass a SOAP object in a SESSION variable. Since this is the case, how do I pass the ET_Client class from page to page so that I do not have to create a new instance? I am making ajax calls to other PHP pages so I need to pass the $client object in order to make any requests.