DEV Community

Discussion on: How to send an SMS from React with Twilio

Collapse
 
kieyran_ profile image
Mahmud Syakiran

Hi, I keep on getting this error:

Proxy error: Could not proxy request /api/messages from localhost:3000 to localhost:3001/.
See nodejs.org/api/errors.html#errors_... for more information (ECONNREFUSED).

How to solve?

Collapse
 
philnash profile image
Phil Nash

Oh, that's interesting. Are you running the server with npm run dev? Are there any other errors in the terminal?

Collapse
 
kieyran_ profile image
Mahmud Syakiran

Yes I am. No other errors in the terminal

Thread Thread
 
philnash profile image
Phil Nash

Have you filled in the .env file with your credentials? And ensure you're not using test credentials?

What's the code you have for the /api/messages endpoint right now?