It turns out that webhooks created through the api are not visible form the backend. Also, they are lost once the app is uninstalled.
Webhook not created but no error either
Question
I'm trying to create a webhook through the Shopify API. Everything seems fine, but I can't see the webhook created in the backend.
Also, when using the ID received through the response to the API call, I try fetching the webhook (/admin/webhooks/{#id}.json
) and I get a 404 not found error.
Here is my PHP code that calls the webhook:
$key = '123456';
$data = array('webhook' => array(
'topic' => 'orders/create',
'address' => BASEURL.'/webhook?key='.$key,
'format' => 'json'
));
$webhook = $shopify->post('webhooks.json',$data);
echo '<pre>'; var_dump($webhook); die();
La solution
Autres conseils
{
"webhook": {
"topic": "orders/create",
"address": "BASEURL.'/webhook?key='.$key",
"format": "json"
}
}
also this may help you
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow