Skip to main content
Box Employee
May 22, 2025 7:45 AM UTC
Question

Webhook requestBody is encrypted how?

I have a webhook setup through the Box CLI that POSTs to a external API when a file is uploaded.    The requestBody looks to be encrypted.   I can't find any information about how this is encrypted and how to de-crypt it,

 

Here is a partial example

 

  "resourcePath" : "/services/apexrest/BoxREST/*",

  "requestURI" : "/BoxREST",

  "requestBody" : "eyJ0eXBlIjoid2ViaG9va19ldmVudCIsI.....

 

    2 replies

    Box Employee
    May 22, 2025 7:45 AM UTC

    Hey , I'm not certain why you would see this behavior.  I happened to be doing some basic testing with our webhooks earlier this week but my notification body was not encrypted.  If you are using one of our SDKs, you might need to go through validating the webhook message.  Here is an example of this in our Node SDK:

    https://github.com/box/box-node-sdk/blob/72acfa8125941dcf2b6c402a671792f74af07637/docs/webhooks.md#validate-a-webhook-message

     

    Is your application using one of our SDKs?

    Translate
    Box Employee
    May 22, 2025 7:45 AM UTC

    Yeah I apparently just needed to convert correctly to see the the response
    body. Not sure why the rest of the response was readable but teh internal
    body was encoded differently I guess. Anyways I can see it now.

    Translate