diff --git a/sample-apps/webhooks-contacts-app/src/actions/webhooks/init.php b/sample-apps/webhooks-contacts-app/src/actions/webhooks/init.php index 7cf0a830..27df05d3 100644 --- a/sample-apps/webhooks-contacts-app/src/actions/webhooks/init.php +++ b/sample-apps/webhooks-contacts-app/src/actions/webhooks/init.php @@ -16,6 +16,7 @@ ; $appId = getEnvOrException('HUBSPOT_APPLICATION_ID'); +$appUrl = UrlHelper::generateServerUri().'/webhooks/handle.php'; $subscriptions = $webhooksClient->subscriptionsApi()->getAll($appId); @@ -25,7 +26,7 @@ WebhooksHelper::updateSubscriptions($appId, $activeSubscriptions, false); $request = new SettingsChangeRequest(); -$request->setTargetUrl(UrlHelper::generateServerUri().'/webhooks/handle.php'); +$request->setTargetUrl($appUrl); $response = $webhooksClient->settingsApi() ->configure($appId, $request)