Webhooks not working at all
AnsweredHi,
I am working on a Box enterprise integration for a client and, for that purpose, I created a Dev account which I'm trying to use for webhooks in order to receive notifications about files/folders updates.
I started with Webhooks v1. Here's what I did:
- Set up the webhook v1 using a valid HTTPS URL
- Configured my URL to accept both GET and POST, and to log every request to a file
- I went into Box UI (the regular browser UI after I log into my Box account) and made changes to the 2 folders in my account: created subfolders, uploaded files, copied files, and so on.
- So far I haven't received any webhook notification
I played around with the config (did so many things that it's hard to remember now), went through the docs over and over again but nothing made the webhook work.
So I decided to try Webhooks v2. This is what I did:
- Created a new webhook v2 through the API. Got a successful response.
- Retrieved the newly created webhook through the API. Also okay.
- Went into Box IU again and made changes to the folder for which I created the webhook.
- Did not even get a beep from webhooks. No notifications whatsoever.
Either I'm not seeing the elephant in the room (missing some steps) or this webhook stuff is not working properly. Could you help me out?
Thanks!
-
Hi,
I think I have the same issue here.
What kind of webhooks have you created ?
I have some webhooks V2 (FILE.UPLOAD, FILE.TRASHED, FOLDER.DELETED). I receive notification from FILE.UPLOAD and FILE.TRASHED but nothing about FOLDER.DELETED.Have you received notification from over webhooks ?
-
I am not receiving any notifications at all. I set up a simple node app to be the endpoint that receives the webhook notifications and I have it writing all incoming requests to a file. I can only see my own calls to such endpoint but nothing else.
I tried using Webhooks V1 first but it did not work. I played around with the application settings on my developer account several times to try and make it work but I got nothing.
Then I tried using Webhooks V2. I could create the webhook for a test folder. This is a modified version of what I used for calling the API:
{ "target": { "id": "116XXXXXXXX", "type": "folder" }, "address": "https://my.service.com/webhook", "triggers": [ "FILE.UPLOADED", "FILE.DOWNLOADED", "FILE.TRASHED", "FILE.DELETED", "FILE.COPIED", "FILE.MOVED", "FOLDER.CREATED", "FOLDER.DELETED" ] }
Then I went to my Box account, used the file manager to upload dummy files and created some folders hoping to get notified about that. None of that worked at all, I got no notification requests from Box Webhooks whatsoever.
It would be very important to have something implemented on Box's end so that developers are able to test Webhooks connectivity. I'm talking about a test button or perhaps a small log that shows webhook notifications requests (date, URL, HTTP status code) made from Box to the endpoint.
BTW, I also created a case for this but that took over a day to get some feedback and the feedback was not helpful. What's more, the page to view and follow up the case is broken due to DNS/CDN errors so the only way to get answers is via email.
-
Hi,
I'm trying to integrate box application webhook to my service. Box application webhook v2 is working fine when I enter root folder id which exists in browser URL( ex:removed for privacy11xxxxxxx) but when I enter 0 for parent/root folder ID it throws 403 response something like this
- error
- Error code is 403
- access_denied_insufficient_permissions
- http://developers.box.com/docs/#errors
- Access denied - insufficient permission
- removed for privacy75819e26ab70aa
Please help me to find the solution and this is my application scope for webhook v2
Content
Read and write all files and folders stored in Box
Enterprise
Manage enterprise
Manage users
Manage groups
Manage enterprise properties
Manage retention policies
Manage webhooks v2 -
Hi,
Although I think this should be a separate thread, I think your problem is the token you are using does not have enough permissions to view folder 0. Perhaps if you try with a Developer Token (which you can obtain from your Box Application page) or a Token that belongs to someone with permissions to view such folder (owner, creator, editor).
Regards,
OJ
-
In reply to my own original post:
I created a support case and discovered that the problem with my Webhooks v2 integration was a bad certificate on the callback URL.
You can use this web to test your own HTTPS URL: https://www.ssllabs.com/ssltest/analyze.html?d=your.callback.url.com
FYI, Webhooks v1 still are not working for me and there is not a way in the UI to disable or remove them.
Cheers,
OJ
-
I also am unable to create a new 2.0 Webhook using PostMan - getting a 403 forbidden while using the Developer token. However that same token works for other endpoints without issue. Am trying to add a webhook to a subfolder under folder 0.
POSTing to url:
https://api.box.com/2.0/webhooks
Headers:
Authorization Bearer *DEVTOKENHERE* Content-Type application/json
Body is:
{"target":{"id":"2***phone number removed for privacy***", "type":"folder"}, "address":"https://discordapp.com/api/webhooks/***number removed for privacy***795053058/H4l4Svk_1W_iKk0gx3xrCrAEeN2JhBWh2I8Vk8dfDzk3u4AW9d3OOnFVm_VOoEZsM8FX", "triggers": ["FILE.DOWNLOADED", "FILE.UPLOADED"]}
What additional access do I need to create webhooks?
-
Also be aware that not all tools for testing webhooks may work.
For example Webhook.site failed, but Request Catcher worked.
Please sign in to leave a comment.
Comments
10 comments