question

ken-nye6499 avatar image
ken-nye6499 asked Phong Vu answered

Webhook Response

Im using the webhook to get the SMS message when they arrive with event filter

/restapi/v1.0/account/{accountId}/extension/{extensionId}/message-store/instant?type=SMS

my problem is reading the binary stream. Im hoping .. fingers crossed that someone can help with classic ASP code.. I know its not modern, but its what Im using. so I found this page online https://stackoverflow.com/questions/56304711/how-to-receive-a-webhook-in-asp-classic

but I get error 3001 on the line Stream.Write bytes

Dim lngBytesCount, post
lngBytesCount = Request.TotalBytes
post = BytesToStr(Request.BinaryRead(lngBytesCount))
Response.ContentType = "text/plain"

Function BytesToStr(bytes)
    Dim Stream
    Set Stream = Server.CreateObject("Adodb.Stream")
        Stream.Type = 1 'adTypeBinary
        Stream.Open
        Stream.Write bytes
        Stream.Position = 0
        Stream.Type = 2 'adTypeText
        Stream.Charset = "utf-8"
        BytesToStr = Stream.ReadText
        Stream.Close
    Set Stream = Nothing
End Function

thanks for any and all help


webhooks
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

I don't think you would get much help from this community with this question which is much related to VBA. Recommend you post your question in stack overflow.

1 |3000

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

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