Level up your Box knowledge with brand new learning paths on Box University. Visit training.box.com to get started

Webhooks not working at all

Answered
New post

Comments

10 comments

  • aqua-dr

    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 ?



    0
    Comment actions Permalink
  • diego-ojeda-glb

    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.

    0
    Comment actions Permalink
  • Veeresh

    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 

    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
    0
    Comment actions Permalink
  • diego-ojeda-glb

    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

    0
    Comment actions Permalink
  • diego-ojeda-glb

    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

    0
    Comment actions Permalink
  • BrianKennedy

    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?

     

    0
    Comment actions Permalink
  • BrianKennedy

    Nevermind - I had failed to check the box to enable webhooks in my Application's configuration.  That might be handy to include in the API readme somewhere?  Maybe I missed it...

    0
    Comment actions Permalink
  • BrianKennedy

    Webhooks continued to not work, but after a call with some Box engineers I was told that v2.0 Webhooks created with a Developer Token will not work correctly.  Creating with a legitimate JWT token using a service account and this should all work fine.

     

    Please mark this as an answer

    0
    Comment actions Permalink
  • Nadisha

    But webhooks v2 was working for me till last week, with my developer token and JWT authentication. It stopped working now 

    0
    Comment actions Permalink
  • guinness

    Also be aware that not all tools for testing webhooks may work.

     

    For example Webhook.site failed, but Request Catcher worked.

    0
    Comment actions Permalink

Please sign in to leave a comment.