You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As requested from the Shopify forum, I'm seeking help in integrating this Shopify API with Webhooks. I created a Private App for my store and built a Customer Creation API call using this code. I thought I'd point the Webhook to a public URL on my personal domain (http://korynorthrop.com), but aside from that I don't understand how to get it all working. How do I get this Webhook to be recognized by my store so that when a new customer is created it will send a response to the public URL declared in the script?
<?session_start();
require__DIR__.'/vendor/autoload.php';
usephpish\shopify;
require__DIR__.'/conf.php';
$shopify = shopify\client(SHOPIFY_SHOP, SHOPIFY_APP_API_KEY, SHOPIFY_APP_PASSWORD, true);
try
{
# Making an API request can throw an exception$customers = $shopify('POST /admin/webhooks.json', array(), array
(
'webook' => array
(
"topic": "customers/create",
"address": "http://korynorthrop.com/path/to/public/handler",
"format": "json"
)
));
print_r($customers);
}
catch (shopify\ApiException$e)
{
# HTTP status code was >= 400 or response contained the key 'errors'echo$e;
print_R($e->getRequest());
print_R($e->getResponse());
}
catch (shopify\CurlException$e)
{
# cURL errorecho$e;
print_R($e->getRequest());
print_R($e->getResponse());
}
?>
The text was updated successfully, but these errors were encountered:
As requested from the Shopify forum, I'm seeking help in integrating this Shopify API with Webhooks. I created a Private App for my store and built a Customer Creation API call using this code. I thought I'd point the Webhook to a public URL on my personal domain (http://korynorthrop.com), but aside from that I don't understand how to get it all working. How do I get this Webhook to be recognized by my store so that when a new customer is created it will send a response to the public URL declared in the script?
The text was updated successfully, but these errors were encountered: