The CreatorCon Call for Content is officially open! Get started here.

SMS Integration with Twilio

SotaT
Tera Contributor

I want to test SMS authentication for MFA. I understand that on the ServiceNow side, it's completed simply by installing the plugin and connecting with an ID and token. However, when I try to log in, I get the error: “Failed to generate 6-digit verification code. Please contact your administrator to log in.” One thing I'm wondering is whether I need to purchase a phone number for sending SMS on the Twilio side. Is this purchase necessary?

 

SotaT_0-1759818882281.pngSotaT_1-1759818946962.png

 

9 REPLIES 9

@SotaT 

 

My understanding is, if you are using Twilio for SMS and Voice Notifications as part of MIM and On-Call notifications, you can use Outbound REST API to Twilio API to invoke SMS notifications without having an active Twilio number. See below for my test setup that I use for SMS and Voice call notifications using trial account with my PDI using Flow Designer REST API actions. If you are invoking SMS notifications directly from ServiceNow without API calls, you need Twilio number to send notifications.

 

Bhuvan_1-1759825131185.png

Bhuvan_0-1759824193410.png

 

As per my understanding, MFA flow is different from outbound REST API and you would need Twilio number as a pre-requisite and would need to configure in Twilio Direct configuration. Please confirm this with ServiceNow Account Representative or Twilio team as I have not configured Twilio for MFA.

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

SotaT
Tera Contributor

@Bhuvan  

Could you please tell me about the settings you configured on the Twilio side?

@SotaT 

 

Community post gets flagged sometimes for sharing external link. Please check the screenshot I attached earlier 'Create a Notification System in ServiceNow using Twilio SMS and Voice' and access the Twilio documentation for step by step instructions to establish the integration.

 

I have checked sample integration established using Outbound REST API and attributes Twilio Phone Number 'From' and sender mobile numbers 'To' in the payload are mandatory, hence you would need Twilio number to setup the integration.

 

Bhuvan_0-1759832053503.png

You can get in touch with Twilio or request from the Twilio website to setup trial account to test the features as it comes bundled with balance of ~15 dollars and you can use it for testing.

 

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Ambuj Tripathi
ServiceNow Employee
ServiceNow Employee

Hi @SotaT 

 

As per my knowledge, once you connect to the twillio integration, you would get the phone number which will be used to send the SMS to the user's mobile number and it would be populated in in teh "Phone Numbers" section in the above first image you shared.

 

Can you please try to disconnect and reconnect to the twillio account again? if this doesn't work, then you can try to force connect by enabling the force connect UI action. 

@Ambuj Tripathi 

Reconnecting doesn't work either.
I don't have a phone number registered with Twilio in the first place. Do I need to purchase one?

SotaT_0-1759822683537.png