# Secure your ixHello App with Multi-Factor Authentication

## **Objective**

This document will demonstrate how to use the Custom Skill feature of the ixHello platform with Multi-Factor Authentication (MFA) support.

## **Introduction to API**

The ixHello platform can integrate with external platform via web API’s. To demonstrate this capability, a demo API endpoint has been created ([https://demo.voiceworx.ai/api/Contacts](https://demo.voiceworx.ai/api/Contacts?Name=%7bName%7d)) in our demo web app “demo.voiceworx.ai”. Multiple API endpoints have been created for Contacts module and will be using the endpoint that searches an underlying Contacts database and returns the contact number of a specific person.

The demo web app created has the ability to perform CRUD operations against the underlying Contacts database that is triggered by calls to the exposed contact API’s in demo.voiceworx.ai

Web App URL : [http://demo.voiceworx.ai](http://demo.voiceworx.ai/)

Contact Finder : [https://demo.voiceworx.ai/api/Contacts?Name={Name}](https://demo.voiceworx.ai/api/Contacts?Name=%7bName%7d)

Here is a sample contact in the database.

![](/files/-MPpZY-8VckUzh8epb7H)

## **Goal**

Our goal is to demonstrate the capability of ixHello to integrate with external platforms and perform CRUD operations against them via web API calls with support for MFA. In this Alexa Skill it is called “**Contact Finder**”. This Alexa app will look up and return a person’s number that is stored in the contacts database and is accessible via the contacts API endpoints in demo.voiceworx.ai. The skill will be protected via a pin code sent to the users that invoked the skill’s phone and email. The MFA prevents unauthorized personnel from accessing the information provided by the skill. When a contact is asked and user has not authenticated with a PIN code, a 4-digit code is sent to the users email and phone number. When the correct pin code is provided by the user while interacting with the skill, access is granted but the PIN code is valid for five minutes. If a user does not interact with the skill within 5 minutes, on next interaction, a PIN code is regenerated and resent to the users email and phone number.

**Note:** the example uses Basic Authentication so username/passwords to the external resource is required.

## **Steps**

The following shows the general steps/activities that will be carried out in setting up this integration. **Note:** It is advisable to use same email for signup across the 3 channels below. Step 1 -3 below are compulsory.

1. [Sign up for Alexa account](http://alexa.amazon.com/)
2. [Sign up for Alexa developer account](https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fus-east-2.console.aws.amazon.com%2Fconsole%2Fhome%3Fregion%3Dus-east-2%26state%3DhashArgs%2523%26isauthcode%3Dtrue\&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fhomepage\&forceMobileApp=0\&code_challenge=9nNXzyrNIGZEa88E12gdwP_z_GcXjUlexn0VjUc6Z_s\&code_challenge_method=SHA-256).
3. [Sign up for VoiceWorx platform](https://portal.voiceworx.ai/Account/Login?ReturnUrl=%2F)
4. Ensure you Login With Amazon (LWA) <https://developer.amazon.com/alexa/console/ask> account is setup by your admin. If you are the account admin, you can follow this instruction to set it up.
5. Set up connection to the external web API
6. Create a custom skill in Voiceworx.
7. Publish the skill
8. Test the Alexa skill.

## **Set up connection to the external web API**

1. Login to the VoiceWorx platform, use left navigation menu and click “**Integration**” then select “**Connect System”**. In the resulting page, click “**Connect External Systems**”.

!\[Graphical user interface, text, application, email

Description automatically generated]\(/files/-MPpZY-9UqOyVWMhtZg2)

1. In “**Connect External System**” select or do the following:

**Select Integration Category**: Custom

**Select System** **Type:** Rest API Service

**Click**: Connect System.

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-An5OKlm6XKfp0)

1. Once in “**Rest API Service Setup**” select or enter the following:

**System Instance Name**: ContactFinder

**Authorization Type**: Basic Auth

**Add Web API URL:** <https://demo.voiceworx.ai>

**Under Basic Auth Settings**

**Enter Username** **and Password**

**Click:** Validate System to ensure you have access to the web API endpoint.

![](/files/-MPpZY-B-ZpL_z3Aj8cM)

## **Create Custom Skill in Voiceworx.ai**

1. To create a custom skill, use left navigation menu and click “**Custom Skills**” then select “**Manage Skills**”. Then click “**Create New Custom Skill**”.

!\[Graphical user interface, text, application, email

Description automatically generated]\(/files/-MPpZY-CQMWlVsnnHIQl)

1. Now add Custom Skill by entering or selecting the following:

**Name:** Contact Finder

**Custom Skill Type**: Search

**Category**: None

**Click**: Save

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-DKciSGB\_ZFqVG)

1. In the top menu tabs, select “**Data Sources**” then “**Create New Data Source**”. Select or enter the following:

**Name:** ContactFinderDS

**Integration Configuration:** Rest API Servic&#x65;**:** ContactFinder

**Manage Connections** to create the external platform WebAPI integration

**Click:** Save

!\[Graphical user interface, application

Description automatically generated]\(/files/-MPpZY-EveuX\_WROh-vn)

1. In the top menu tabs, select “**Methods**” then select “**Create New Methods**”. Then select or enter the following:

**Name**: GetPhoneNumberByName

**Request Type**: GET

**Query Path**: ?name={{Person}}

**Result Type**: Record

**Method Path:** /api/contacts

**Method Result-Empty Result Template:** Phone Number Not Found For Requested Contact

**Result Template:** {{Person}} phone number is {{Phone}}

**Click:** Save

!\[Graphical user interface, application, email

Description automatically generated]\(/files/-MPpZY-FS1GaZkNS8bas)

1. In the top menu tabs, select “**Intents**” and “**Create New Intent**”. Then select or enter the following:

**Name:** GetPhoneNumberByName

**Intent Type:** Search

**Intent Action:** Executive Method

**DataSource:** ContactFinderDS

**DataSource Method:** GetPhoneNumberByName

**Click:** Save

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-G-Z9Nbf50Y4sn)

1. In the top menu tabs, select “**Slots**” and select “**Create New Slot**”. Note the Reprompt message is what Alexa will ask if it can’t fill/resolve the person slot. Then select or enter the following:

**Name:** Person

**Slot Order:** Blank

**Reprompt Message:** What is the person name

**Type:** Person

**Custom Skill:** ContactFinder

**Intent:** GetPhoneNumber

**Click:** Save

!\[Graphical user interface, text, application, email

Description automatically generated]\(/files/-MPpZY-Hk2lsmL9B4\_Xu)

1. In the top menu tabs, select “**Utterance**” and select “**Create New Utterance**”. Utterance are words spoken to launch specific intents. Now input or select the following:

**Value:** What is the phone number for (Person)

**Custom Skill:** ContactFinder

**Intent:** GetPhoneNumber

**Click:** Save

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-I0QqMXx7U1PFh)

1. In the top menu tabs, select “**Input**” and select “**Create New Input**”. Then input or select the following:

**Name:** Person

**Custom Skill:** ContactFinder

**Custom Intent:** GetPhoneNumber

**Data Source:** ContactFinderDS

**Data Source Method:** GetPhoneNumberByName

!\[Graphical user interface, application

Description automatically generated]\(/files/-MPpZY-JjySTRVxQuAXb)

## **Publish to Alexa**

1. In the top menu tabs select “**Publish**” then click “**Add Skill Publishing**”. Then enter or select the following:

![](/files/-MPpZY-KDeUkxmPdxQKl)

**External Skill Name**: ContactFinder. (This will be the name of the skill in Alexa. Therefore, make it unique and different from the names of your other skills in Alexa.)

**Skill Type**: Select Search

**Channel**: Select Alexa

**Uncheck the following**: Require account linking, Auto Publish

**Skill Invocation Name**: ContactFinder. (This will be what users say to launch your skill in Alexa. It must be in lower case alphabets cannot contain **START, BEGIN, STOP, EXIT, LAUNCH** and cannot contain number or special characters.)

**Optional**: Replace all placeholder values in all “Message”. Uncheck all the settings shown in the second image below except the Enable MFA check box

**Click**: Save.

!\[Graphical user interface, text, application, email

Description automatically generated]\(/files/-MPpZY-LX9NGC926pIjD)

!\[Graphical user interface, text, application, Word

Description automatically generated]\(/files/-MPpZY-MdAJ3wk-3ixug)

1. A slot named “**Pin**” will automatically be added for all intents.
2. In the top menu tabs select “**Publish**” then click “**Publish to Alexa**”.

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-NyVCXoqIvNoeU)

1. Once in Publish Skill to Amazon Alexa select and do the following:

**Selected Skill**: Contact Finder

**Select Amazon Account:** LWA Config

Select the LWA account setup by your admin or the one you set up in step 4 above.

**Click**: Publish To Alexa

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-OmwHeoK-tGbhl)

1. On the resulting screen, ensure that a success message shows for the publishing steps before clicking the “**Go To Alexa Skill**”. If success message not shown, click “**Go To Skill Publishing**” to fix any issue shown in publishing result.

!\[Graphical user interface, text, application

Description automatically generated]\(/files/-MPpZY-PEnbruXrTiGHA)

1. On the Alexa skill page, ensure “**Full Build Successful**” message is shown in bottom right corner before starting to test skill.

!\[Graphical user interface, text, website

Description automatically generated]\(/files/-MPpZY-QIIv92mcPK2FP)

1. Go to “**test**” tab in the top menu, then below “**test**” tab change the skill test status from “**Off**” to “**Development**”.

![](/files/-MPpZY-RDjZofWDPQSXc)

1. Invoke skill by typing the invocation name (Contact Finder) inserted in the publishing step in Voiceworx. If the invocation is successful, your configured welcome message will be displayed in the developer console.

!\[A screenshot of a computer screen

Description automatically generated]\(/files/-MPpZY-SU5P2xb2PGHdt)

1. Invoke an intent and a pin will be requested

!\[Graphical user interface, text, application, chat or text message

Description automatically generated]\(/files/-MPpZY-TwLUxTqfLw2Wf)

Congratulations!

You have successfully completed a Secure your VoiceWorx Skill

with Multi-Factor Authentication.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixhello.com/ixhc/apps/secure-your-voiceworx-app-with-multi-factor-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
