Smartsheet Webhook callback

kskarz
kskarz ✭✭✭✭
edited 11/25/22 in API & Developers

Hi,

When the smartsheet event callback is send to the url (server) it expects to receive a call back acknowledgment (status 200). If the subscriber fails to respond with a 200 status, depending on the response, Smartsheet may retry delivery up to 14 times.

My question is how much time do we have to send back the call back acknowledgment before Smartsheet will retry and send the same event again.

I looked in the documentation but couldn't find anything in there in reagrds to this.

Answers

  • Hi @kskarz

    I haven't tested this myself, but this is the information from the API Documentation on Webhooks:

    "If the subscriber fails to respond with a 200 status, depending on the response, Smartsheet may retry delivery up to 14 times. The first 7 retry attempts occur with a frequency that's determined using exponential backoff; thereafter, retry attempts occur once every three hours until all retries have been exhausted."

    See: Webhooks - Retry Logic

    I hope that helps!

    Genevieve

    Join us at Smartsheet ENGAGE 2024 🎉
    October 8 - 10, Seattle, WA | Register now

  • admn
    admn ✭✭

    Hi,

    I have the same problem.

    I need to know is how much time do we have to send back the call back acknowledgment before Smartsheet will retry and send the same event again

    Thanks

  • Any possible way I can see anyone's script they are using? I was able to figure out the webhook issue a few weeks ago and I have 100's of webhooks setup now, with zero issues.


    var request = require("request");


    var options = {

      method: 'POST',

      url: 'https://api.smartsheet.com/2.0/webhooks',

      headers: {

        'Authorization': 'Bearer <ACCESS_TOKEN>',

        'Content-Type': 'application/json'

      },

      body: JSON.stringify({

        "name": "smartsheet",

        "callbackUrl": "https://callbackurl.com",

        "scope": "sheet",

        "scopeObjectId": SheetID,

        "subscope": {

          "columnIds": [

            8818339260196740

          ]

        },

        "events": ["*.*"],

        "version": 1

      })

    };


    request(options, function (error, response, body) {

      if (error) throw new Error(error);


      console.log(body);

    });

  • const smartsheet = require('smartsheet');


    // initialize Smartsheet client

    const smartsheetClient = smartsheet.createClient({

      accessToken: 'your-access-token'

    });


    // define the webhook ID and the updated request body

    const webhookId = WebhookID;

    const body = {

      enabled: true

    };


    // update the webhook

    smartsheetClient.webhooks.updateWebhook(webhookId, body)

      .then((updatedWebhook) => {

        console.log(`Webhook updated: ${JSON.stringify(updatedWebhook)}`);

      })

      .catch((error) => {

        console.error(`Error updating webhook: ${error}`);

      });