0
List Messages
One script reply has been approved by the moderators Verified

Return a list of messages associated with your account. See the docs for more information

Created by armancemaripota 913 days ago Viewed 9114 times
0
Submitted by hugo697 Bun
Verified 423 days ago
1
import { Twilio } from "twilio";
2

3
type Twilio = {
4
  accountSid: string;
5
  token: string;
6
};
7

8
export async function main(twilio: Twilio) {
9
  const client = new Twilio(twilio.accountSid, twilio.token);
10
  const messages = await client.messages.list();
11
  return messages;
12
}
13

Other submissions