You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The authenticate method will print into the console an url that you will have to visit to achieve authentication. Then after visiting the link and authenticate you will have to paste back the resulting url into the console. The method will return True and print a message if it was succesful.
286
286
287
287
**Tip:** When using macOS the console is limited to 1024 characters. If your url has multiple scopes it can exceed this limit. To solve this. Just import readline at the top of your script.
@@ -370,14 +370,14 @@ For example your application can have Calendar.Read, Mail.ReadWrite and Mail.Sen
Scope implementation depends on the protocol used. So by using protocol data you can automatically set the scopes needed. This is implemented by using 'scope helpers'. Those are little helpers that group scope functionality and abstract the protocol used.
383
383
@@ -419,7 +419,7 @@ You can get the same scopes as before using protocols and scope helpers like thi
<spanclass="sig-name descname"><spanclass="pre">serializer</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre"><module</span><spanclass="pre">'json'</span><spanclass="pre">from</span><spanclass="pre">'/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/json/__init__.py'></span></em><aclass="headerlink" href="#O365.utils.token.BaseTokenBackend.serializer" title="Link to this definition"></a></dt>
447
+
<spanclass="sig-name descname"><spanclass="pre">serializer</span></span><emclass="property"><spanclass="w"></span><spanclass="p"><spanclass="pre">=</span></span><spanclass="w"></span><spanclass="pre"><module</span><spanclass="pre">'json'</span><spanclass="pre">from</span><spanclass="pre">'/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/json/__init__.py'></span></em><aclass="headerlink" href="#O365.utils.token.BaseTokenBackend.serializer" title="Link to this definition"></a></dt>
Copy file name to clipboardExpand all lines: docs/latest/getting_started.html
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -145,13 +145,13 @@ <h2>Basic Usage<a class="headerlink" href="#basic-usage" title="Link to this hea
145
145
<p>The first step to be able to work with this library is to register an application and retrieve the auth token. See <aclass="reference internal" href="#authentication"><spanclass="std std-ref">Authentication</span></a>.</p>
146
146
<p>With the access token retrieved and stored you will be able to perform api calls to the service.</p>
147
147
<p>A common pattern to check for authentication and use the library is this one:</p>
148
-
<divclass="highlight-python notranslate"><divclass="highlight"><pre><span></span><spanclass="n">scopes</span><spanclass="o">=</span><spanclass="p">[</span><spanclass="s1">'my_required_scopes'</span><spanclass="p">]</span><spanclass="c1"># you can use scope helpers here (see Permissions and Scopes section)</span>
148
+
<divclass="highlight-python notranslate"><divclass="highlight"><pre><span></span><spanclass="n">requested_scopes</span><spanclass="o">=</span><spanclass="p">[</span><spanclass="s1">'my_required_scopes'</span><spanclass="p">]</span><spanclass="c1"># you can use scope helpers here (see Permissions and Scopes section)</span>
<spanclass="k">if</span><spanclass="ow">not</span><spanclass="n">account</span><spanclass="o">.</span><spanclass="n">is_authenticated</span><spanclass="p">:</span><spanclass="c1"># will check if there is a token and has not expired</span>
153
153
<spanclass="c1"># ask for a login using console based authentication. See Authentication for other flows</span>
The authenticate method will print into the console an url that you will have to visit to achieve authentication. Then after visiting the link and authenticate you will have to paste back the resulting url into the console. The method will return True and print a message if it was succesful.</p>
400
400
<p><strong>Tip:</strong> When using macOS the console is limited to 1024 characters. If your url has multiple scopes it can exceed this limit. To solve this. Just import readline at the top of your script.</p>
401
401
</li>
@@ -480,14 +480,14 @@ <h3>Scopes<a class="headerlink" href="#scopes" title="Link to this heading"><
<p>Scope implementation depends on the protocol used. So by using protocol data you can automatically set the scopes needed. This is implemented by using ‘scope helpers’. Those are little helpers that group scope functionality and abstract the protocol used.</p>
@@ -578,7 +578,7 @@ <h3>Scopes<a class="headerlink" href="#scopes" title="Link to this heading"><
0 commit comments