From 5c69e936ca34b087c7c4e68b27c5caab9d9efc1b Mon Sep 17 00:00:00 2001 From: ksvirkou Date: Fri, 21 Aug 2020 15:04:05 +0300 Subject: [PATCH] fix webhooks init --- .../webhooks-contacts-app/src/actions/webhooks/init.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)