- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
A Weebly Developer reached out to me in a developer support case with troubles setting up webhooks and asking me to confirm that we were broadcasting events. I hadn't received any other reports of issues with webhooks, and after I provided the developer with my step-by-step webhook troubleshooting guide, everything was working as expected.
Are you experiencing issues while developing with Webhooks?
Have you learned something about developing with Webhooks, and want to help other Weebly Developers?
- Labels:
-
development
-
Troubleshooting
-
webhooks
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
To test that your app is receiving webhook events properly, you will want to simplify the problem by reducing it down to the most simple of use cases. The easiest way to do that is to ONLY subscribe to the simplest actions a site administrator can perform and which are known to generate/broadcast expected events: user.update
, app.uninstall.
Optionally, you can subscribe to site.publish
events which is also a common action performed by Weebly Site Administrators.
Webhook Troubleshooting Guide:
- Make sure the
webhooks.events
array in your app's manifest.json file includesuser.update
,app.uninstall
, and optionallysite.publish.
- Just to make sure, I always explicitly add
read:user
in thescopes
property of my app's manifest.json file. (If you addedsite.publish
events to your webhook subscription, make sure to addread:site
to thescopes
array of your app's manifest.json). - Make sure the
webhooks.callback_url
is set to a publicly available URI over TLS/SSL (uses thehttps
scheme). - If you had to make any of the above changes to your code or app's manifest.json, make sure to bundle/upload a new ZIP (you can use the same version in development mode).
- If you had to complete step 4, make sure you uninstall the previously installed version (just to be certain) using the Weebly Site Admin -> Apps -> My Apps/Manage Apps
- If you had to complete step 4, make sure to install the newly saved draft into your development test site and complete the authorization flow.
- Once the app installation is complete, logout of Weebly (https://www.weebly.com/logout) completely.
- Once logout has completed, log back into Weebly (https://www.weebly.com/login) as if you were going to make content changes to your Developer Test Site, and now you should receive a
user.update
event (I've stripped my private data from the following example).
{
"client_id": "XXXXXXXXX",
"client_version": "1.0.0",
"event": "user.update",
"timestamp": 1526502531,
"data": {
"user_id": XXXXXXXX
},
"hmac": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
9. If you included site.publish
event in your webhook subscription, go ahead and publish the site where you have your app installed, and verify that you are receiving Site Publish events.
Let me know if this helps.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report