-
Notifications
You must be signed in to change notification settings - Fork 731
/
Copy pathREADME.html
305 lines (289 loc) · 25.2 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><!--Google Tag Manager--><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'%26l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MWRD6S');</script><!--End Google Tag Manager-->
<meta content="IE=Edge" http-equiv="X-UA-Compatible"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<title>twilio-python — twilio-python 7.15.1 documentation</title>
<link href="_static/alabaster.css" rel="stylesheet" type="text/css"/>
<link href="_static/pygments.css" rel="stylesheet" type="text/css"/>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js" type="text/javascript"></script>
<script src="_static/jquery.js" type="text/javascript"></script>
<script src="_static/underscore.js" type="text/javascript"></script>
<script src="_static/doctools.js" type="text/javascript"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<link href="genindex.html" rel="index" title="Index"/>
<link href="search.html" rel="search" title="Search"/>
<link href="docs/source/_rst/modules.html" rel="next" title="twilio"/>
<link href="index.html" rel="prev" title="Welcome to twilio-python’s documentation!"/>
<link href="_static/custom.css" rel="stylesheet" type="text/css"/>
<meta content="width=device-width, initial-scale=0.9, maximum-scale=0.9" name="viewport"/>
</head><body><!--Google Tag Manager (noscript)--><noscript><iframe height="0" src="https://www.googletagmanager.com/ns.html?id=GTM-MWRD6S" style="display:none;visibility:hidden" width="0"></iframe></noscript><!--End Google Tag Manager (noscript)-->
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="twilio-python">
<h1>twilio-python<a class="headerlink" href="#twilio-python" title="Permalink to this headline">¶</a></h1>
<p><a class="reference external" href="https://github.com/twilio/twilio-python/actions/workflows/test-and-deploy.yml"><img alt="Tests" src="https://github.com/twilio/twilio-python/actions/workflows/test-and-deploy.yml/badge.svg"/></a>
<a class="reference external" href="https://pypi.python.org/pypi/twilio"><img alt="PyPI" src="https://img.shields.io/pypi/v/twilio.svg"/></a>
<a class="reference external" href="https://pypi.python.org/pypi/twilio"><img alt="PyPI" src="https://img.shields.io/pypi/pyversions/twilio.svg"/></a>
<a class="reference external" href="https://twil.io/learn-open-source"><img alt="Learn OSS Contribution in TwilioQuest" src="https://img.shields.io/static/v1?label=TwilioQuest&message=Learn%20to%20contribute%21&color=F22F46&labelColor=1f243c&style=flat-square&logo=data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAASFBMVEUAAAAZGRkcHBwjIyMoKCgAAABgYGBoaGiAgICMjIyzs7PJycnMzMzNzc3UoBfd3d3m5ubqrhfrMEDu7u739/f4vSb/3AD///9tbdyEAAAABXRSTlMAAAAAAMJrBrEAAAKoSURBVHgB7ZrRcuI6EESdyxXGYoNFvMD//+l2bSszRgyUYpFAsXOeiJGmj4NkuWx1Qeh+Ekl9DgEXOBwOx+Px5xyQhDykfgq4wG63MxxaR4ddIkg6Ul3g84vCIcjPBA5gmUMeXESrlukuoK33+33uID8TWeLAdOWsKpJYzwVMB7bOzYSGOciyUlXSn0/ABXTosJ1M1SbypZ4O4MbZuIDMU02PMbauhhHMHXbmebmALIiEbbbbbUrpF1gwE9kFfRNAJaP+FQEXCCTGyJ4ngDrjOFo3jEL5JdqjF/pueR4cCeCGgAtwmuRS6gDwaRiGvu+DMFwSBLTE3+jF8JyuV1okPZ+AC4hDFhCHyHQjdjPHUKFDlHSJkHQXMB3KpSwXNGJPcwwTdZiXlRN0gSp0zpWxNtM0beYE0nRH6QIbO7rawwXaBYz0j78gxjokDuv12gVeUuBD0MDi0OQCLvDaAho4juP1Q/jkAncXqIcCfd+7gAu4QLMACCLxpRsSuQh0igu0C9Svhi7weAGZg50L3IE3cai4IfkNZAC8dfdhsUD3CgKBVC9JE5ABAFzg4QL/taYPAAWrHdYcgfLaIgAXWJ7OV38n1LEF8tt2TH29E+QAoDoO5Ve/LtCQDmKM9kPbvCEBApK+IXzbcSJ0cIGF6e8gpcRhUDogWZ8JnaWjPXc/fNnBBUKRngiHgTUSivSzDRDgHZQOLvBQgf8rRt+VdBUUhwkU6VpJ+xcOwQUqZr+mR0kvBUgv6cB4+37hQAkXqE8PwGisGhJtN4xAHMzrsgvI7rccXqSvKh6jltGlrOHA3Xk1At3LC4QiPdX9/0ndHpGVvTjR4bZA1ypAKgVcwE5vx74ulwIugDt8e/X7JgfkucBMIAr26ndnB4UCLnDOqvteQsHlgX9N4A+c4cW3DXSPbwAAAABJRU5ErkJggg=="/></a></p>
<div class="section" id="documentation">
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h2>
<p>The documentation for the Twilio API can be found <a class="reference external" href="https://www.twilio.com/docs/api">here</a>.</p>
<p>The Python library documentation can be found <a class="reference external" href="https://twilio.github.io/twilio-python">here</a>.</p>
</div>
<div class="section" id="versions">
<h2>Versions<a class="headerlink" href="#versions" title="Permalink to this headline">¶</a></h2>
<p><code class="docutils literal notranslate"><span class="pre">twilio-python</span></code> uses a modified version of <a class="reference external" href="https://semver.org">Semantic Versioning</a> for all changes. <a class="reference internal" href="VERSIONS.html"><span class="doc">See this document</span></a> for details.</p>
<div class="section" id="migrating-from-5-x">
<h3>Migrating from 5.x<a class="headerlink" href="#migrating-from-5-x" title="Permalink to this headline">¶</a></h3>
<p>Please consult the <a class="reference external" href="https://www.twilio.com/docs/libraries/python/migration-guide">official migration guide</a> for information on upgrading your application using twilio-python 5.x to 6.x</p>
</div>
<div class="section" id="supported-python-versions">
<h3>Supported Python Versions<a class="headerlink" href="#supported-python-versions" title="Permalink to this headline">¶</a></h3>
<p>This library supports the following Python implementations:</p>
<ul class="simple">
<li>Python 3.6</li>
<li>Python 3.7</li>
<li>Python 3.8</li>
<li>Python 3.9</li>
<li>Python 3.10</li>
</ul>
</div>
</div>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h2>
<p>Install from PyPi using <a class="reference external" href="https://pip.pypa.io/en/latest/">pip</a>, a
package manager for Python.</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">twilio</span>
</pre></div>
</div>
<p>If pip install fails on Windows, check the path length of the directory. If it is greater 260 characters then enable <a class="reference external" href="https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation">Long Paths</a> or choose other shorter location.</p>
<p>Don’t have pip installed? Try installing it, by running this from the command
line:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl https://bootstrap.pypa.io/get-pip.py | python
</pre></div>
</div>
<p>Or, you can <a class="reference external" href="https://github.com/twilio/twilio-python/zipball/main">download the source code
(ZIP)</a> for <code class="docutils literal notranslate"><span class="pre">twilio-python</span></code>, and then run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python</span> <span class="n">setup</span><span class="o">.</span><span class="n">py</span> <span class="n">install</span>
</pre></div>
</div>
<p>You may need to run the above commands with <code class="docutils literal notranslate"><span class="pre">sudo</span></code>.</p>
</div>
<div class="section" id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h2>
<p>Getting started with the Twilio API couldn’t be easier. Create a
<code class="docutils literal notranslate"><span class="pre">Client</span></code> and you’re ready to go.</p>
<div class="section" id="api-credentials">
<h3>API Credentials<a class="headerlink" href="#api-credentials" title="Permalink to this headline">¶</a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">Twilio</span></code> needs your Twilio credentials. You can either pass these
directly to the constructor (see the code below) or via environment variables.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">account</span> <span class="o">=</span> <span class="s2">"ACXXXXXXXXXXXXXXXXX"</span>
<span class="n">token</span> <span class="o">=</span> <span class="s2">"YYYYYYYYYYYYYYYYYY"</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
</pre></div>
</div>
<p>Alternatively, a <code class="docutils literal notranslate"><span class="pre">Client</span></code> constructor without these parameters will
look for <code class="docutils literal notranslate"><span class="pre">TWILIO_ACCOUNT_SID</span></code> and <code class="docutils literal notranslate"><span class="pre">TWILIO_AUTH_TOKEN</span></code> variables inside the
current environment.</p>
<p>We suggest storing your credentials as environment variables. Why? You’ll never
have to worry about committing your credentials and accidentally posting them
somewhere public.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="specify-region-and-or-edge">
<h3>Specify Region and/or Edge<a class="headerlink" href="#specify-region-and-or-edge" title="Permalink to this headline">¶</a></h3>
<p>To take advantage of Twilio’s <a class="reference external" href="https://www.twilio.com/docs/global-infrastructure">Global Infrastructure</a>, specify the target Region and/or Edge for the client:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">region</span><span class="o">=</span><span class="s1">'au1'</span><span class="p">,</span> <span class="n">edge</span><span class="o">=</span><span class="s1">'sydney'</span><span class="p">)</span>
</pre></div>
</div>
<p>A <code class="docutils literal notranslate"><span class="pre">Client</span></code> constructor without these parameters will also look for <code class="docutils literal notranslate"><span class="pre">TWILIO_REGION</span></code> and <code class="docutils literal notranslate"><span class="pre">TWILIO_EDGE</span></code> variables inside the current environment.</p>
<p>Alternatively, you may specify the edge and/or region after constructing the Twilio client:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">()</span>
<span class="n">client</span><span class="o">.</span><span class="n">region</span> <span class="o">=</span> <span class="s1">'au1'</span>
<span class="n">client</span><span class="o">.</span><span class="n">edge</span> <span class="o">=</span> <span class="s1">'sydney'</span>
</pre></div>
</div>
<p>This will result in the <code class="docutils literal notranslate"><span class="pre">hostname</span></code> transforming from <code class="docutils literal notranslate"><span class="pre">api.twilio.com</span></code> to <code class="docutils literal notranslate"><span class="pre">api.sydney.au1.twilio.com</span></code>.</p>
</div>
<div class="section" id="make-a-call">
<h3>Make a Call<a class="headerlink" href="#make-a-call" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">account</span> <span class="o">=</span> <span class="s2">"ACXXXXXXXXXXXXXXXXX"</span>
<span class="n">token</span> <span class="o">=</span> <span class="s2">"YYYYYYYYYYYYYYYYYY"</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
<span class="n">call</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">calls</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="n">to</span><span class="o">=</span><span class="s2">"9991231234"</span><span class="p">,</span>
<span class="n">from_</span><span class="o">=</span><span class="s2">"9991231234"</span><span class="p">,</span>
<span class="n">url</span><span class="o">=</span><span class="s2">"http://twimlets.com/holdmusic?Bucket=com.twilio.music.ambient"</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="n">call</span><span class="o">.</span><span class="n">sid</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="send-an-sms">
<h3>Send an SMS<a class="headerlink" href="#send-an-sms" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="n">account</span> <span class="o">=</span> <span class="s2">"ACXXXXXXXXXXXXXXXXX"</span>
<span class="n">token</span> <span class="o">=</span> <span class="s2">"YYYYYYYYYYYYYYYYYY"</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
<span class="n">message</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">messages</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="n">to</span><span class="o">=</span><span class="s2">"+12316851234"</span><span class="p">,</span> <span class="n">from_</span><span class="o">=</span><span class="s2">"+15555555555"</span><span class="p">,</span>
<span class="n">body</span><span class="o">=</span><span class="s2">"Hello there!"</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="enable-debug-logging">
<h3>Enable Debug Logging<a class="headerlink" href="#enable-debug-logging" title="Permalink to this headline">¶</a></h3>
<p>Log the API request and response data to the console:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">logging</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
<span class="n">logging</span><span class="o">.</span><span class="n">basicConfig</span><span class="p">()</span>
<span class="n">client</span><span class="o">.</span><span class="n">http_client</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
</pre></div>
</div>
<p>Log the API request and response data to a file:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">logging</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
<span class="n">logging</span><span class="o">.</span><span class="n">basicConfig</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s1">'./log.txt'</span><span class="p">)</span>
<span class="n">client</span><span class="o">.</span><span class="n">http_client</span><span class="o">.</span><span class="n">logger</span><span class="o">.</span><span class="n">setLevel</span><span class="p">(</span><span class="n">logging</span><span class="o">.</span><span class="n">INFO</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="section" id="handling-exceptions">
<h3>Handling Exceptions<a class="headerlink" href="#handling-exceptions" title="Permalink to this headline">¶</a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.rest</span> <span class="kn">import</span> <span class="n">Client</span>
<span class="kn">from</span> <span class="nn">twilio.base.exceptions</span> <span class="kn">import</span> <span class="n">TwilioRestException</span>
<span class="n">account</span> <span class="o">=</span> <span class="s2">"ACXXXXXXXXXXXXXXXXX"</span>
<span class="n">token</span> <span class="o">=</span> <span class="s2">"YYYYYYYYYYYYYYYYYY"</span>
<span class="n">client</span> <span class="o">=</span> <span class="n">Client</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">token</span><span class="p">)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">message</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">messages</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="n">to</span><span class="o">=</span><span class="s2">"+12316851234"</span><span class="p">,</span> <span class="n">from_</span><span class="o">=</span><span class="s2">"+15555555555"</span><span class="p">,</span>
<span class="n">body</span><span class="o">=</span><span class="s2">"Hello there!"</span><span class="p">)</span>
<span class="k">except</span> <span class="n">TwilioRestException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
</pre></div>
</div>
<p>For more descriptive exception types, please see the <a class="reference external" href="https://www.twilio.com/docs/libraries/python/usage-guide#exceptions">Twilio documentation</a>.</p>
</div>
<div class="section" id="generating-twiml">
<h3>Generating TwiML<a class="headerlink" href="#generating-twiml" title="Permalink to this headline">¶</a></h3>
<p>To control phone calls, your application needs to output <a class="reference external" href="https://www.twilio.com/docs/api/twiml">TwiML</a>.</p>
<p>Use <code class="docutils literal notranslate"><span class="pre">twilio.twiml.Response</span></code> to easily create such responses.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">twilio.twiml.voice_response</span> <span class="kn">import</span> <span class="n">VoiceResponse</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">VoiceResponse</span><span class="p">()</span>
<span class="n">r</span><span class="o">.</span><span class="n">say</span><span class="p">(</span><span class="s2">"Welcome to twilio!"</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">r</span><span class="p">))</span>
</pre></div>
</div>
<div class="highlight-xml notranslate"><div class="highlight"><pre><span></span><span class="cp"><?xml version="1.0" encoding="utf-8"?></span>
<span class="nt"><Response><Say></span>Welcome to twilio!<span class="nt"></Say></Response></span>
</pre></div>
</div>
</div>
<div class="section" id="using-a-custom-http-client">
<h3>Using a Custom HTTP Client<a class="headerlink" href="#using-a-custom-http-client" title="Permalink to this headline">¶</a></h3>
<p>To use a custom HTTP client with this helper library, please see the <a class="reference external" href="https://www.twilio.com/docs/libraries/python/custom-http-clients-python">Twilio documentation</a>.</p>
</div>
<div class="section" id="docker-image">
<h3>Docker Image<a class="headerlink" href="#docker-image" title="Permalink to this headline">¶</a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">Dockerfile</span></code> present in this repository and its respective <code class="docutils literal notranslate"><span class="pre">twilio/twilio-python</span></code> Docker image are currently used by Twilio for testing purposes only.</p>
</div>
<div class="section" id="getting-help">
<h3>Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h3>
<p>If you need help installing or using the library, please check the <a class="reference external" href="https://support.twilio.com">Twilio Support Help Center</a> first, and <a class="reference external" href="https://twilio.com/help/contact">file a support ticket</a> if you don’t find an answer to your question.</p>
<p>If you’ve instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div aria-label="main navigation" class="sphinxsidebar" role="navigation">
<div class="sphinxsidebarwrapper"><h3><a href="https://www.twilio.com/docs/libraries/python">About twilio-python</a></h3>
<p>
A Python module for communicating with the Twilio API and generating <a href="http://www.twilio.com/docs/api/twiml/">TwiML</a>.
</p>
<h3>Useful Links</h3>
<ul>
<li><a href="https://www.twilio.com/docs/libraries/python">Twilio's Python Helper Library Docs</a></li>
<li><a href="https://pypi.org/project/twilio/">twilio @ PyPI</a></li>
<li><a href="https://github.com/twilio/twilio-python">twilio-python @ GitHub</a></li>
</ul>
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">twilio-python</a><ul>
<li><a class="reference internal" href="#documentation">Documentation</a></li>
<li><a class="reference internal" href="#versions">Versions</a><ul>
<li><a class="reference internal" href="#migrating-from-5-x">Migrating from 5.x</a></li>
<li><a class="reference internal" href="#supported-python-versions">Supported Python Versions</a></li>
</ul>
</li>
<li><a class="reference internal" href="#installation">Installation</a></li>
<li><a class="reference internal" href="#getting-started">Getting Started</a><ul>
<li><a class="reference internal" href="#api-credentials">API Credentials</a></li>
<li><a class="reference internal" href="#specify-region-and-or-edge">Specify Region and/or Edge</a></li>
<li><a class="reference internal" href="#make-a-call">Make a Call</a></li>
<li><a class="reference internal" href="#send-an-sms">Send an SMS</a></li>
<li><a class="reference internal" href="#enable-debug-logging">Enable Debug Logging</a></li>
<li><a class="reference internal" href="#handling-exceptions">Handling Exceptions</a></li>
<li><a class="reference internal" href="#generating-twiml">Generating TwiML</a></li>
<li><a class="reference internal" href="#using-a-custom-http-client">Using a Custom HTTP Client</a></li>
<li><a class="reference internal" href="#docker-image">Docker Image</a></li>
<li><a class="reference internal" href="#getting-help">Getting help</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="index.html" title="previous chapter">Welcome to twilio-python’s documentation!</a></li>
<li>Next: <a href="docs/source/_rst/modules.html" title="next chapter">twilio</a></li>
</ul></li>
</ul>
</div>
<div aria-label="source link" role="note">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/README.md.txt" rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" role="search" style="display: none">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form action="search.html" class="search" method="get">
<input name="q" type="text"/>
<input type="submit" value="Go"/>
<input name="check_keywords" type="hidden" value="yes"/>
<input name="area" type="hidden" value="default"/>
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2019, Twilio.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.8.0</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/README.md.txt" rel="nofollow">Page source</a>
</div>
</body>
</html>