const express = require("express");
const app = express();
const PORT = 3000;
require("dotenv").config();
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_TOKEN;
const client = require("twilio")(accountSid, authToken);
client.messages
.create({
to: process.env.NUMBER,
from: "+18598006707",
body: "Hello Kashif",
})
.then((message) => console.log(message.sid));
app.listen(PORT, () => {
console.log("server is at", PORT);
});
see image for accountSid
I am getting accountSid must start with AC even though my account sid starting with AC.