I'm currently working on an integration between Podio and another API, and i've stumbled on the following situation:
I currently have to find information from a reference in one workspace in an app containing information about invoices and then locate the specific customer in the other workspace in an app containing that information.
I used to be able to just authenticate myself with more than one app at a time, and then dynamically get information from references to other apps. But right now I have to follow the following code flow to not get exceptions:
- I have to first Authenticate myself with the Invoices app
- Fetch the PodioObjects I need
- Run through the items one by one, each time Authenticate myself with the Customer app so I can fetch their information and then again Authenticate myself with the Invoice app
That means a ton of requests to Podio, which I shouldn't need.
$authenticateCustomers = Podio::authenticate_with_app(*, '*');
$customer = PodioItem::get($itemId);
$name = $customer->fields['companies']->values;
$authenticateSales = Podio::authenticate_with_app(*, '*');
Before the above snippet I've already Authenticated with them in my constructor.
If I remove the authentications, I get Exceptions due to not being Authenticated.
Advice? Thanks in advance.