new(security.gblib): SMS Auth.

This commit is contained in:
Rodrigo Rodriguez 2024-03-11 15:07:38 -03:00
parent 40feb37297
commit c5c3101642

View file

@ -354,12 +354,13 @@ export class GBConversationalService {
// tslint:disable:no-unsafe-any due to Nexmo.
public async sendSms(min: GBMinInstance, mobile: string, text: string): Promise<any> {
GBLog.info(`Sending SMS to ${mobile} with text: '${text}'.`);
let botNumber = process.env.BOT_NUMBER;
GBLog.info(`Sending SMS from ${botNumber} to ${mobile} with text: '${text}'.`);
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(null, authToken, { accountSid: accountSid });
let botNumber = process.env.BOT_NUMBER;
const msg = await client.messages
.create({