1 (edited by boxygen 05/07/2021 12:30:38 pm)

Topic: How to manage Call to API From within FA

I am trying to use API in a project where API call is from within FA for the currently logged in user and company.

In this case how the session will be handled in the current FA API plugin.

Session Handling
I don't want to create a new session. Instead want to use the same session.

API Call
I created a test page and called the absolute url using file_get_contents as below and I got response.

$result = file_get_contents('https://pakerp.net/modules/api-bx/category');

But I am not sure what is the right way to call API using relative path within FA.

www.boxygen.pk

Re: How to manage Call to API From within FA

I am  not sure which one are you looking. Inside FA  there is no need of api session.  And also api is module which recreates session to avoid unnecessary risks from calls.  But you can create session and set ttl  for it and reuse that in api calls too.

Subscription service based on FA
HRM CRM POS batch Themes