question

Ralf Kloth avatar image
Ralf Kloth asked Phong Vu commented

C# Webhook Subscription - Validation Token not in Header - Sandbox

In the Sandbox the "Validation-Token" is NOT returned in the Header (as described in the documentation) - in the RequestBody the Validation-Token is delivered:

{"validationToken":"d52ca641-1297-4784-ac69-5e04062f161b"}

In the Production environment this is different. There the token ist correctly delivered in the Header as "Validation-Token".

There seems to be a difference between Sandbox and Production environment!

Note: There must have been a change in the Sandbox lately because this also worked in the Sandbox in the past.

rest apiwebhooks
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

What is the Web framework you are running on?

4 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.

Ralf Kloth avatar image Ralf Kloth commented ·

We use Azure Functions and .NET 6.0.

0 Likes 0 ·
Phong Vu avatar image Phong Vu ♦♦ Ralf Kloth commented ·

Ok, so it looks like the latest change (only on sandbox for evaluation) has an impact on Azure. The change was that the validation-token is sent with the body is e.g.

{"validationToken":"f5520450-09d8-42b7-90d5-aa22282dccb8"}

And the content-length set with the length of the body. Can you show how the return of Validation-Token header is handled in your code?

Is it possible that Azure check the content-length != 0 and send the body only?

-1 Like -1 ·
Ralf Kloth avatar image Ralf Kloth Phong Vu ♦♦ commented ·

I could see the problem now.

In our code we checked if the content length was 0 and only then checked for the Validaten-Tken in the header. Because now the validationToken ist also send in the body - this code did not work anymore. When I change this it works again.

Note: Such a change may also impact other developers who may use a similar code as me!

Thanks for your help.

0 Likes 0 ·
Show more comments

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