#How to subscribe to a NextJS API Route endpoint?

1 messages · Page 1 of 1 (latest)

lethal python
ancient oxideBOT
#

Hi @lethal python. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

lethal python
#

Got it! thank you so much! ++@azure topaz

ancient oxideBOT
#

Sorry @lethal python, I seem to be having a bit of trouble. Don't worry though, I've pinged my supprt and they will try to fix me up! :technologist:

Perhaps try again in 15mins?

lethal python
#

using WebSockets maybe?

lethal python
#

Well...I asked chat-GPT and it was able to mention a bunch of different ways to achieve this. One probable way of doing it is by using a Nextjs route API endpoint that will be given to a Twilio phone number as a webhook, then I can use pusher channels and useSWRSubscription from swr to fetch real-time updates...