Question

Webhook 400 BadRequest

  • 25 April 2024
  • 2 replies
  • 49 views

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?


2 replies

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

Userlevel 1

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.

Reply