How to parse data from zoho crm webhook?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to parse data from zoho crm webhook?



I have been at trying to receive data from a webhook i setup in zoho crm for hours, the webhook fires but returns a error code 503 and when i try to save the data to a file it is always blank. My webhook is suppose to fire when a record is updated and pass that record ID to the webhook url. I am new to zoho so if anyone out has done this before your help is much appreciated.


add_action( 'rest_api_init', 'register_api_hooks' );

function register_api_hooks()
register_rest_route( 'ep-to-zoho-crm/v1', '/updatecompany/', array(
'methods' => 'GET',
'callback' => 'webhook_listener',
));
;

function webhook_listener($request)
$client = new ZohoCRMClient('Contacts', 'API KEY HERE');

$data = $request->get_param( 'companyid' );

$record = $client->getRecordById()->id($data)->request();

$save = file_put_contents(plugin_dir_path( __FILE__ ).'test.txt', $data);

return $record;





Might want to remove your API key, just saying. $client = new ZohoCRMClient('Contacts', '******');
– ArtisticPhoenix
2 mins ago



$client = new ZohoCRMClient('Contacts', '******');





Thanks alot i totally missed it.
– Dian Reid
16 secs ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS