This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In Package Manager, run: | |
// Install-Package Twilio.Mvc -DependencyVersion HighestMinor | |
using System.Web.Mvc; | |
using Twilio.Mvc; | |
using Twilio.TwiML; | |
using Twilio.TwiML.Mvc; | |
public class VoiceController : TwilioController | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/ksh | |
Init() | |
{ | |
#(1) Set a work directory | |
WORK_DIR="$( pwd )/work" | |
if [ ! -d ${WORK_DIR} ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Download the Node helper library from twilio.com/docs/node/install . You can do this by doing “ sudo npm install twilio -g —save " | |
// These vars are your accountSid and authToken from twilio.com/user/account | |
var accountSid = process.env.TWILIO_ACCOUNT_SID; | |
var authToken = process.env.TWILIO_AUTH_TOKEN ; | |
var LookupsClient = require('twilio').LookupsClient; | |
var client = new LookupsClient(accountSid, authToken); | |
var fs = require('fs'); | |
var readline = require('readline'); | |
var errFileCreated='N'; |
This is an example serverless function (tested on Netlify Functions) that you could call from their frontend application to retrieve results from Impala REST API.
ℹ️ Please see below, a reference architecture for one of the secure ways of calling Impala APIs(any external APIs, for that matter) from your frontend application.
❌ NEVER STORE YOUR CREDENTIALS ON CLIENT SIDE.
- Store your credentials server side. Fetch the API response to any external API from this endpoint and then pass them to the frontend.
- For ease, you can build a lean endpoint on any preferred serverless offerings like AWS lambda, Azure/Google/Vercel Functions