Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
EN
Uploaded by
Masashi Shinbara
17,174 views
Twilio API を PHP で触ってみよう
2013/10/17 Twilio API 勉強会
Technology
◦
Read more
5
Save
Share
Embed
Embed presentation
Download
Downloaded 25 times
1
/ 51
2
/ 51
3
/ 51
4
/ 51
5
/ 51
6
/ 51
7
/ 51
8
/ 51
9
/ 51
10
/ 51
11
/ 51
12
/ 51
13
/ 51
14
/ 51
15
/ 51
16
/ 51
17
/ 51
18
/ 51
19
/ 51
20
/ 51
21
/ 51
22
/ 51
23
/ 51
24
/ 51
25
/ 51
26
/ 51
27
/ 51
28
/ 51
29
/ 51
30
/ 51
31
/ 51
32
/ 51
33
/ 51
34
/ 51
35
/ 51
36
/ 51
37
/ 51
38
/ 51
39
/ 51
40
/ 51
41
/ 51
42
/ 51
43
/ 51
44
/ 51
45
/ 51
46
/ 51
47
/ 51
48
/ 51
49
/ 51
50
/ 51
51
/ 51
More Related Content
PDF
Vagrant で PHP 開発環境を作る ハンズオン
by
Masashi Shinbara
PDF
Vagrant で作る PHP 開発環境 [実践編]
by
Masashi Shinbara
PDF
Heroku で作る スケーラブルな PHP アプリケーション
by
Masashi Shinbara
PDF
Ansible ではじめるサーバ作業の自動化
by
Masashi Shinbara
PDF
もう XAMPP / MAMP はいらない! Vagrant で作る PHP 開発環境
by
Masashi Shinbara
PDF
開発現場で活用するVagrant
by
Masashi Shinbara
PDF
わかってるフレームワーク Laravel
by
Masashi Shinbara
PDF
Azure Websites で作るスケーラブルな PHP アプリケーション
by
Masashi Shinbara
Vagrant で PHP 開発環境を作る ハンズオン
by
Masashi Shinbara
Vagrant で作る PHP 開発環境 [実践編]
by
Masashi Shinbara
Heroku で作る スケーラブルな PHP アプリケーション
by
Masashi Shinbara
Ansible ではじめるサーバ作業の自動化
by
Masashi Shinbara
もう XAMPP / MAMP はいらない! Vagrant で作る PHP 開発環境
by
Masashi Shinbara
開発現場で活用するVagrant
by
Masashi Shinbara
わかってるフレームワーク Laravel
by
Masashi Shinbara
Azure Websites で作るスケーラブルな PHP アプリケーション
by
Masashi Shinbara
What's hot
PDF
Vagrant体験入門
by
Masashi Shinbara
PDF
いまどきのPHP
by
Masashi Shinbara
PDF
Vagrant を Web開発環境に使う
by
Masashi Shinbara
PDF
ビルドサーバで使うDocker
by
Masashi Shinbara
PDF
Laravel ユーザなら知っておくべきAuthオートログイン
by
Masashi Shinbara
PDF
PHPコードではなく PHPコードの「書き方」を知る
by
Masashi Shinbara
PDF
BOSHでお手軽CFデプロイon AWS
by
i_yudai
PDF
AWS SDK for Smalltalk
by
Sho Yoshida
PDF
Elixir Meetup #1 Loggerの構造と拡張
by
Sugawara Genki
PDF
フィードフォースと AWS と私
by
a know
PDF
Terraforming
by
Tomoaki Yahagi
PDF
Lambdaによるクラウド型言語の実装
by
Sugawara Genki
PPTX
SpringOne 2015 報告会 - Lattice + Spring Cloud Netflix
by
Tommy Ludwig
PDF
DevStackで始めるCloud FoundryとBOSH
by
i_yudai
PPTX
Step by stepで学ぶTerraformによる監視付きAWS構築
by
Yo Takezawa
PDF
Fission で 始める Containerless Kubernetes #serverlesstokyo
by
y_taka_23
PDF
さくらのインフラコード
by
Yukihiko SAWANOBORI
PDF
Ansible 2.0を使って組む kubernetesクラスタ vol.1
by
Hidetoshi Hirokawa
PDF
Rubyを使った分散全文検索ミドルウェア
by
Kouhei Sutou
PDF
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
by
Masashi Shinbara
Vagrant体験入門
by
Masashi Shinbara
いまどきのPHP
by
Masashi Shinbara
Vagrant を Web開発環境に使う
by
Masashi Shinbara
ビルドサーバで使うDocker
by
Masashi Shinbara
Laravel ユーザなら知っておくべきAuthオートログイン
by
Masashi Shinbara
PHPコードではなく PHPコードの「書き方」を知る
by
Masashi Shinbara
BOSHでお手軽CFデプロイon AWS
by
i_yudai
AWS SDK for Smalltalk
by
Sho Yoshida
Elixir Meetup #1 Loggerの構造と拡張
by
Sugawara Genki
フィードフォースと AWS と私
by
a know
Terraforming
by
Tomoaki Yahagi
Lambdaによるクラウド型言語の実装
by
Sugawara Genki
SpringOne 2015 報告会 - Lattice + Spring Cloud Netflix
by
Tommy Ludwig
DevStackで始めるCloud FoundryとBOSH
by
i_yudai
Step by stepで学ぶTerraformによる監視付きAWS構築
by
Yo Takezawa
Fission で 始める Containerless Kubernetes #serverlesstokyo
by
y_taka_23
さくらのインフラコード
by
Yukihiko SAWANOBORI
Ansible 2.0を使って組む kubernetesクラスタ vol.1
by
Hidetoshi Hirokawa
Rubyを使った分散全文検索ミドルウェア
by
Kouhei Sutou
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
by
Masashi Shinbara
Viewers also liked
PDF
【B-1】kintoneでお手軽コールセンター!
by
Sakae Saito
PDF
Twilioを使ったAndroidのSMS認証の実装
by
Hiroyuki Nozaki
PPTX
今日からでもできる!とある企業のtwilio活用方法
by
Yoshimasa Yaguma
PPTX
Twilioでコールセンター
by
Toshiro Yagi
PDF
「自動電話リレーサービス」を作ってみてわかった、Twilioを使ったビジネスの可能性
by
Katsumi Takahashi
PDF
AWSアイデアソン20150509
by
Noriyuki Koide
PDF
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
by
Masashi Shinbara
PDF
コミュニティで歴史をつくろう!
by
Noriyuki Koide
PPTX
TwilioAPIやってみた(エンジニアちゃうけど)俺聞け7
by
Hiroko Osaki
PDF
Twilioが動いているところを見てみよう(仮)
by
Sakae Saito
PDF
Twilioビジネスセミナー資料
by
Katsumi Takahashi
PDF
Twilio jpug大阪(掲載用)20160227
by
Noriyuki Koide
PDF
Twilio Japan Summit 2014 presentation
by
Noriyuki Koide
PDF
TwilioコールセンターアプリRuna-CCA紹介
by
Naoki Ishimitsu
PPTX
【Twilio勉強会 with Bluemix in 福岡】 電話のボタン応答無しで!?音声認識による自動回答サービスを作ろう!
by
Masaya Fujita
PDF
電話とは何か、そして Twilio の正体
by
Kiminari Homma
PDF
Building Blocks for Next Generation Contact Centers
by
Twilio Inc
【B-1】kintoneでお手軽コールセンター!
by
Sakae Saito
Twilioを使ったAndroidのSMS認証の実装
by
Hiroyuki Nozaki
今日からでもできる!とある企業のtwilio活用方法
by
Yoshimasa Yaguma
Twilioでコールセンター
by
Toshiro Yagi
「自動電話リレーサービス」を作ってみてわかった、Twilioを使ったビジネスの可能性
by
Katsumi Takahashi
AWSアイデアソン20150509
by
Noriyuki Koide
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
by
Masashi Shinbara
コミュニティで歴史をつくろう!
by
Noriyuki Koide
TwilioAPIやってみた(エンジニアちゃうけど)俺聞け7
by
Hiroko Osaki
Twilioが動いているところを見てみよう(仮)
by
Sakae Saito
Twilioビジネスセミナー資料
by
Katsumi Takahashi
Twilio jpug大阪(掲載用)20160227
by
Noriyuki Koide
Twilio Japan Summit 2014 presentation
by
Noriyuki Koide
TwilioコールセンターアプリRuna-CCA紹介
by
Naoki Ishimitsu
【Twilio勉強会 with Bluemix in 福岡】 電話のボタン応答無しで!?音声認識による自動回答サービスを作ろう!
by
Masaya Fujita
電話とは何か、そして Twilio の正体
by
Kiminari Homma
Building Blocks for Next Generation Contact Centers
by
Twilio Inc
Similar to Twilio API を PHP で触ってみよう
PDF
Twilio TBS - 20140301
by
Joohoun Song
PDF
fukuokaphp7 PHP x twilio
by
ichikaway
PDF
phpcon2013 PHP x twilio
by
ichikaway
PDF
Twilio入門 -Web アプリ編-
by
Masashi Shinbara
PDF
日本語消えたスライド
by
Masashi Shinbara
PDF
Twilio API 勉強会 Vol.12 - アイデアを元にTwilioの機能を試してみる会
by
Joohoun Song
PDF
20130927 MA9 東京ハッカソン発表資料
by
Joohoun Song
PDF
Twilio api-jaws
by
Joohoun Song
PDF
第0回 Twilio勉強会 with JAWS UG in 福岡
by
Youhei Iwasaki
PPTX
Bluemixユーザー会発表資料 - デモ付き
by
twilioforkwc
PDF
【Twilio client】twiliox azureハンズオン
by
twilioforkwc
PDF
Twilio serveless architecture
by
Kiminari Homma
PPT
Twilio rubyhiroba
by
Joohoun Song
PDF
IPメッセージングはこうやって実装するのだ!
by
Sakae Saito
PDF
Twilioハンズオン資料 鹿児島
by
Joohoun Song
PPT
1221bot講習会
by
佑輔 小林
Twilio TBS - 20140301
by
Joohoun Song
fukuokaphp7 PHP x twilio
by
ichikaway
phpcon2013 PHP x twilio
by
ichikaway
Twilio入門 -Web アプリ編-
by
Masashi Shinbara
日本語消えたスライド
by
Masashi Shinbara
Twilio API 勉強会 Vol.12 - アイデアを元にTwilioの機能を試してみる会
by
Joohoun Song
20130927 MA9 東京ハッカソン発表資料
by
Joohoun Song
Twilio api-jaws
by
Joohoun Song
第0回 Twilio勉強会 with JAWS UG in 福岡
by
Youhei Iwasaki
Bluemixユーザー会発表資料 - デモ付き
by
twilioforkwc
【Twilio client】twiliox azureハンズオン
by
twilioforkwc
Twilio serveless architecture
by
Kiminari Homma
Twilio rubyhiroba
by
Joohoun Song
IPメッセージングはこうやって実装するのだ!
by
Sakae Saito
Twilioハンズオン資料 鹿児島
by
Joohoun Song
1221bot講習会
by
佑輔 小林
More from Masashi Shinbara
PDF
いまどきのPHP開発現場 -2015年秋-
by
Masashi Shinbara
PDF
先取り!PHP 7 と WordPress
by
Masashi Shinbara
PDF
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
by
Masashi Shinbara
PDF
How to learn Laravel5 application from Authentication
by
Masashi Shinbara
PDF
認証機能で学ぶ Laravel 5 アプリケーション
by
Masashi Shinbara
PDF
VagrantユーザのためのDocker入門
by
Masashi Shinbara
PDF
キャラ立ちしたエンジニアになる!
by
Masashi Shinbara
PDF
Composer 再入門
by
Masashi Shinbara
PDF
PHP 5.5 Zend OPcache
by
Masashi Shinbara
PDF
サーバの防災訓練
by
Masashi Shinbara
PDF
Kansai PHP Users Group 2012年活動報告
by
Masashi Shinbara
KEY
10分で分かる最近のCakePHP
by
Masashi Shinbara
いまどきのPHP開発現場 -2015年秋-
by
Masashi Shinbara
先取り!PHP 7 と WordPress
by
Masashi Shinbara
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
by
Masashi Shinbara
How to learn Laravel5 application from Authentication
by
Masashi Shinbara
認証機能で学ぶ Laravel 5 アプリケーション
by
Masashi Shinbara
VagrantユーザのためのDocker入門
by
Masashi Shinbara
キャラ立ちしたエンジニアになる!
by
Masashi Shinbara
Composer 再入門
by
Masashi Shinbara
PHP 5.5 Zend OPcache
by
Masashi Shinbara
サーバの防災訓練
by
Masashi Shinbara
Kansai PHP Users Group 2012年活動報告
by
Masashi Shinbara
10分で分かる最近のCakePHP
by
Masashi Shinbara
Twilio API を PHP で触ってみよう
1.
Twilio API を PHP
で触ってみよう 2013/10/17 shin1x1 Twilio API 勉強会
2.
Agenda • Twilioライブラリ • インストール •
電話を受ける • 電話を受ける(簡易 IVR) • 電話をかける • セキュリティ (c) 2013 Masashi Shinbara @shin1x1
3.
Twilioライブラリ (c) 2013 Masashi
Shinbara @shin1x1
4.
Twilioライブラリ • Twilio API
と連携するライブラリ • 主な機能 (REST API, TwiML, バリデーション) • 各言語版 (PHP, Ruby, Python, .NET, Java, Node.js, Salesforce, C++ 等々) (c) 2013 Masashi Shinbara @shin1x1
5.
Twilio PHP ライブラリ •
twilio-php • PHP 5.2 以上 • PEAR, ZIP, Composer • Composer でインストール (c) 2013 Masashi Shinbara @shin1x1
6.
インストール (c) 2013 Masashi
Shinbara @shin1x1
7.
コード https://gist.github.com/shin1x1/7006593 #twilioapistudy (c) 2013 Masashi
Shinbara @shin1x1
8.
Composer インストール $ cd
yourdir $ curl -s http://getcomposer.org/ installer | php $ ls composer.phar (c) 2013 Masashi Shinbara @shin1x1
9.
twilio-php インストール $ php
composer.phar require twilio/sdk devmaster $ ls composer.json composer.lock composer.phar vendor (c) 2013 Masashi Shinbara @shin1x1
10.
インストール確認 • サンプルスクリプト [sample.php] <?php require_once
__DIR__.'/vendor/autoload.php'; $xml = new Services_Twilio_Twiml(); $xml->say('Hello!'); header('Content-type: text/xml; charset=utf-8'); echo $xml; http://xxx/yourdir/sample.php (c) 2013 Masashi Shinbara @shin1x1
11.
電話を受ける (c) 2013 Masashi
Shinbara @shin1x1
12.
電話を受ける 050-xxxx-xxxx Twilio Webサーバ (c) 2013 Masashi
Shinbara @shin1x1
13.
電話を受ける HTTPリクエスト (c) 2013 Masashi
Shinbara @shin1x1
14.
電話を受ける 処理を実行 TwiML生成 (c) 2013 Masashi
Shinbara @shin1x1
15.
電話を受ける TwiMLを返す (c) 2013 Masashi
Shinbara @shin1x1
16.
電話を受ける 音声を返す 電話を転送 応答を待つ等々 (c) 2013 Masashi
Shinbara @shin1x1
17.
電話を受ける HTTPリクエスト (c) 2013 Masashi
Shinbara @shin1x1
18.
電話を受ける TwiMLを返す (c) 2013 Masashi
Shinbara @shin1x1
19.
電話を受ける • HTTPリクエストが来たら • 何か処理をして •
TwiMLを返す 普通のWebシステムと一緒! (c) 2013 Masashi Shinbara @shin1x1
20.
作ってみよう! • 電話をかけると • 「こんにちは!」と言ってくれる •
TwiML 生成にライブラリを使う (c) 2013 Masashi Shinbara @shin1x1
21.
PHPコード •inbound.php <?php require_once __DIR__.'/vendor/autoload.php'; $xml =
new Services_Twilio_Twiml(); $xml->say('こんにちは!', array('language' => 'ja-jp')); header('Content-type: text/xml; charset=utf-8'); print $xml; http://xxx/yourdir/inbound.php (c) 2013 Masashi Shinbara @shin1x1
22.
管理画面 URL を変更する http://hoge/yourdir/inbound.php 保存を忘れずに (c) 2013
Masashi Shinbara @shin1x1
23.
電話してみよう 050-xxxx-xxxx 「こんにちは!」が聞こえればok (c) 2013 Masashi
Shinbara @shin1x1
24.
電話を受ける (簡易IVR) (c) 2013 Masashi
Shinbara @shin1x1
25.
IVR • プッシュフォンで操作 • インタラクティブな操作を実現 •
電話の転送などもできる (c) 2013 Masashi Shinbara @shin1x1
26.
IVR • 宅配便の再配達依頼 • コールセンター案内 •
チケット購入 • などなど (c) 2013 Masashi Shinbara @shin1x1
27.
簡易IVR • アナウンスが流れる • 1
なら「1を押しました」 (c) 2013 Masashi Shinbara @shin1x1
28.
簡易IVR 050-xxxx-xxxx Twilio Webサーバ (c) 2013 Masashi
Shinbara @shin1x1
29.
簡易IVR HTTPリクエスト (c) 2013 Masashi
Shinbara @shin1x1
30.
簡易IVR TwiMLを返す <Gather> (c) 2013 Masashi
Shinbara @shin1x1
31.
簡易IVR 応答待ち (c) 2013 Masashi
Shinbara @shin1x1
32.
簡易IVR 1 をプッシュ Twilio Webサーバ (c) 2013
Masashi Shinbara @shin1x1
33.
簡易IVR HTTPリクエスト 「1が押された」 Digits = 1 (c)
2013 Masashi Shinbara @shin1x1
34.
簡易IVR TwiMLを返す <Say> (c) 2013 Masashi
Shinbara @shin1x1
35.
簡易IVR 「1を押しました」 (c) 2013 Masashi
Shinbara @shin1x1
36.
簡易IVR <?php require_once __DIR__.'/vendor/autoload.php'; $xml =
new Services_Twilio_Twiml(); if (empty($_POST['Digits'])) { $digit = null; } else { $digit = (integer)$_POST['Digits']; } if ($digit == 1) { $xml->say('1を押しました。', array('language' => 'ja-jp')); } else { $xml->say('こんにちは!1 を押して下さい。', array('language' => 'ja-jp')); } $xml->gather(array('numDigits' => 1, 'timeout' => 30)); header('Content-type: text/xml; charset=utf-8'); echo $xml; (c) 2013 Masashi Shinbara @shin1x1
37.
簡易IVR • アナウンスが流れる • 1
/ 2 / 3 / 9 を受け付ける • 1-3 なら「Nを押しました」 • 9 で終了 (c) 2013 Masashi Shinbara @shin1x1
38.
電話をかける (c) 2013 Masashi
Shinbara @shin1x1
39.
電話をかける HTTPリクエスト REST API Webサーバ Twilio 電話 (c) 2013
Masashi Shinbara @shin1x1
40.
電話をかける 通話に利用する TwiML取得 Webサーバ Twilio 電話 (c) 2013 Masashi
Shinbara @shin1x1
41.
電話をかける 050-xxxx-xxxx から電話! Webサーバ Twilio 電話 (c) 2013 Masashi
Shinbara @shin1x1
42.
SID / Token ACCOUNT
SID AUTH TOKEN https://jp.twilio.com/user/account (c) 2013 Masashi Shinbara @shin1x1
43.
電話をかける <?php require_once __DIR__.'/vendor/autoload.php'; $sid =
'xxx'; $token = 'xxx'; $client = new Services_Twilio($sid, $token); $ret = $client->account->calls->create( '+81-xx-xxxx-xxxx', // From number(Twilio) '+81-xx-xxxx-xxxx', // To number(Your phone number) 'http://demo.twilio.com/docs/voice.xml' ); var_dump($ret->sid); http://xxx/yourdir/outbound.php (c) 2013 Masashi Shinbara @shin1x1
44.
セキュリティ (c) 2013 Masashi
Shinbara @shin1x1
45.
Twilio からのリクエスト検証 • SSL(自己証明書はNG) •
Basic / Digest認証 • リクエストのバリデーション (HMAC-SHA1形式署名検証) (ライブラリで対応可) (c) 2013 Masashi Shinbara @shin1x1
46.
セキュリティページ https://jp.twilio.com/docs/security (c) 2013 Masashi
Shinbara @shin1x1
47.
まとめ (c) 2013 Masashi
Shinbara @shin1x1
48.
まとめ • Twilioとの連携は HTTP
の世界 • TwiML か REST API か • SMS には海外番号が必要 • 既存システムとの連携から (c) 2013 Masashi Shinbara @shin1x1
49.
参照 https://jp.twilio.com/docs (c) 2013 Masashi
Shinbara @shin1x1
50.
参照 http://blog.twilio.kddi-web.com/%E3%82%BC%E3%83%AD%E3%81%8B %E3%82%89%E3%81%AF%E3%81%98%E3%82%81%E3%82%8B%E3%81%9Ctwilio/ (c) 2013 Masashi
Shinbara @shin1x1
51.
@shin1x1 (c) 2013 Masashi
Shinbara @shin1x1
Download