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 400 BadRequest
Tags: webhooks
Apr 25, 2024 at 12:30pm   •   1 replies  •  0 likes
Alex Shin

Hi,

I'm working off of this article. https://developers.ringcentral.com/guide/notifications/webhooks/quick-start

and I get a /502 Bad Gateway error on my ngrok terminal and a 400 Bad Request on my Webhook-notification.js terminal.
My code seems to be failing at this point in the subscribe_for_notification function.
1714072035519.png


I also tried this tutorial and I get see a 400 Bad Request error but also a OAU-251 error instead. I error out during the login here. I've tried both basic auth and JWT
https://ringcentral-tutorials.github.io/a2p-sms-messaging-nodejs-demo/#23


client_id: WJYXofu7pt7dSbcylvWvFn


Also I don't know if this is related, but when I register a application, it goes straight into Production instead of Sandbox. Is that normally how that should happen?

Is there something that I'm missing?

1 Answer
answered on Apr 25, 2024 at 12:43pm  

I found the issue with the first "quick start" article. I just needed to set the PORT to 5000 instead of 30001714074155255.png

Should I be seeing something on the Webhook-server.js terminal? When I send a SMS I don't see anything.
1714078536911.png


 0
on Apr 25, 2024 at 2:08pm   •  0 likes

Thanks for pointing out. My bad when I tested the sample code the port 5000 was running and I forgot to change it to 3000 for most of the languages. I will fixed and release the update soon.

on Apr 25, 2024 at 2:13pm   •  0 likes

No Problem, I have one more question. I'm getting a Webhook is not reachable error. do you think you could switch my A2P Application to sandbox mode so I can do some development testing?

I'm thinking the prod environment is restricting my progress. I would make a brand new Application, but all my new application go straight into Prod for some reason.
client id: WJYXofu7pt7dSbcylvWvFn

on Apr 26, 2024 at 7:46am   •  0 likes

No need to switch to sandbox mode. Sandbox is also supported after the app was created and auto-graduated. The app works on both environments.

A2P SMS is not supported in sandbox account thought.

on Apr 26, 2024 at 11:21am   •  0 likes

So I try to create a subscription, but it doesn't stay open. I get this initially
1714155549709.png1714155565280.png

It looks like the connect is open, but then it doesn't look like it stays open.1714155603021.png

Is that supposed to happen? If not, what am I doing wrong?



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