{"id":3526,"date":"2024-10-12T22:43:51","date_gmt":"2024-10-12T14:43:51","guid":{"rendered":"https:\/\/siqhealers.com\/?page_id=3526"},"modified":"2024-10-12T23:12:06","modified_gmt":"2024-10-12T15:12:06","slug":"webhook-endpoint","status":"publish","type":"page","link":"https:\/\/siqhealers.com\/en\/webhook-endpoint\/","title":{"rendered":"Webhook Endpoint"},"content":{"rendered":"\n     <?php\n     \/* Template Name: Webhook Handler *\/\n\n     \/\/ Exit if accessed directly\n     if (!defined('ABSPATH')) {\n         exit;\n     }\n\n     \/\/ Handle GET request for verification\n     if ($_SERVER['REQUEST_METHOD'] === 'GET' &#038;&#038; isset($_GET['hub_verify_token'])) {\n         $verify_token = '20vnq3t[]g29u4h4\\bisnh.,\/'; \/\/ Replace with your verify token\n         if ($_GET['hub_verify_token'] === $verify_token) {\n             echo $_GET['hub_challenge'];\n             exit;\n         } else {\n             echo 'Invalid verify token';\n             exit;\n         }\n     }\n\n     \/\/ Handle POST request for webhook events\n     if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n         $input = file_get_contents('php:\/\/input');\n         $data = json_decode($input, true);\n\n         \/\/ Log the incoming data for debugging\n         error_log(print_r($data, true));\n\n         \/\/ TODO: Add your logic to handle the webhook data here\n\n         echo 'OK';\n         exit;\n     }\n     \n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-3526","page","type-page","status-publish","hentry"],"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"Eric Roxas","author_link":"https:\/\/siqhealers.com\/en\/author\/ericroxas\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/pages\/3526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/comments?post=3526"}],"version-history":[{"count":1,"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/pages\/3526\/revisions"}],"predecessor-version":[{"id":3527,"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/pages\/3526\/revisions\/3527"}],"wp:attachment":[{"href":"https:\/\/siqhealers.com\/en\/wp-json\/wp\/v2\/media?parent=3526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}