News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Webhook Response
Tags: webhooks
Jan 21, 2022 at 1:58pm   •   1 replies  •  0 likes
ken-nye

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


1 Answer
answered on Jan 24, 2022 at 8:11am  

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.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us