I would need the XID that EE generages for a form to be fetched in PHP code and passed as json to a third party mobile app. The mobile app will include the XID value in its form and post the form to the EE index.php url. This way the user will be logged in via the app. If i generage the form in my plugin code like this:
$form = $this->EE->functions->form_declaration($form_details);
I get the html of the form with the hidden fields. I do not want the form html, I need only the XID value which I will return from my plugin function.
There are several ways of getting this data: