• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Fabrik & Webhook

sunnyjey

Active Member
I am trying to fetch and process the inbound data from the third party App & create new row in Fabrik List. But no idea to do it. Would be grateful if someone guides me to achieve it.

I guess first we have to create mywebsite.com/webhook.php & place third part code like:

PHP:
const WEBHOOK_SECRET = 'webhook secret key';
function verifySignature ($body, $signature) {
    $digest = hash_hmac('sha1', $rawPost, WEBHOOK_SECRET);
    return $signature !== $digest ;
}
if (!verifySignature(file_get_contents('php://input'), $_SERVER['HTTP_MY_APP_SIGNATURE'])) {
    // verification failed
}
// verification success

I really dont know how to proceed further & integrate Fabrik to process inbound data.
 
If you only need the data you can write directly to the database table.

If you want Fabrik form functionality you can turn "Spoof check" off in form settings
http://fabrikar.com/forums/index.php?wiki/forms/#form-processing
In this case copy the list and set very restrict access settings.
You can add a php form plugin onload for checking e.g. an additional secret in your params (if not set echo some error and exit)
You can add a php form plugin onAfter to echo some result (e.g. a JSON with data)

Then you can call the form via POST, something like
Code:
        $url = 'https://your-domain/index.php?option=com_fabrik&task=form.process&formid=9';

        $postarray =    array(
                 'table___element1' => $fname,
   ...
                'postPassw' => 'yourSecret'
            );

        $postdata = http_build_query($postarray);
            $opts = array('http' =>
            array(
                'method'  => 'POST',
                'header'  => array(
                    'Content-type: application/x-www-form-urlencoded;charset=utf-8',
                    ),
                'content' => $postdata
                )
        );
        $context  = stream_context_create($opts);

        $result = file_get_contents($url, false, $context);

It's up to you to ensure correct user authentication, session handling etc.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top