The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
| var TWILIO_SID = '<Twilio-SID>', | |
| TWILIO_TOKEN = '<Twilio-token>', | |
| FROM_PHONE = '3143006228', | |
| VERIFICATION_MESSAGE_INTRO = 'Your verification code: ', | |
| TELE_PREFIX = '+1', | |
| twilio = require('twilio'), | |
| Q = require('q'), | |
| _ = require('lodash'); |