question

Aaron Zigler avatar image
Aaron Zigler asked Phong Vu commented

validation token error not found while creating webhook subscription

While Creating a webhook subscription, I am getting an error of

"errorCode" : "SUB-520" , "message" : "Validation Token is not returned" .



errorswebhooksget token
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Phong Vu commented
Did you return the validation token while creating the subscription? You have to return the validation token within 3 seconds. Otherwise, you would receive that error message. See the dev guide for sample code of how to return a validation token.
2 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I already read the dev Guide. But my question is where do I get the validation token? because in the dev guide there is no parameter passed as a validation token. There is only Url, events, delivery mode, transport, and address. Please help me with that.

0 Likes 0 ·

Check the Getting Started code example. Here is the highlighted part showing how to just return the validation token in the header.

if (req.headers.hasOwnProperty("validation-token")) {
        res.setHeader('Content-type', 'application/json');
        res.setHeader('Validation-Token', req.headers['validation-token']);
        res.statusCode = 200;
        res.end();
      }
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys