Return details of a message. See the docs for more information
1
import { Twilio } from "twilio";
2
3
type Twilio = {
4
accountSid: string;
5
token: string;
6
};
7
8
export async function main(twilio: Twilio, messageId: string) {
9
const client = new Twilio(twilio.accountSid, twilio.token);
10
const message = await client.messages(messageId).fetch();
11
return message;
12
}
13
export async function main(twilio: Twilio, messageId: string): Promise<void> {
console.log(message);