<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python DropboxOAuth2Flow Error: WSGIRequest' object does not support item assignment in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/285824#M17521</link>
    <description>&lt;P&gt;In case someone needs this:&lt;/P&gt;&lt;P&gt;The first argument passed is usually the request object. Simply&amp;nbsp;reference the session&amp;nbsp;object on&amp;nbsp;the request like so: web_app_session.session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Updated:&lt;/P&gt;&lt;PRE&gt;from dropbox import DropboxOAuth2Flow
from django.shortcuts import redirect

def get_dropbox_auth_flow(web_app_session):
    redirect_uri = "https://www.my-dummy-server.com"
    APP_KEY = 'my-app-key'
    APP_SECRET = 'my-app-secret'
    return DropboxOAuth2Flow(
        APP_KEY, APP_SECRET, redirect_uri, web_app_session, "dropbox-auth-csrf-token")

def dropbox_auth_start(web_app_session):
    authorize_url = get_dropbox_auth_flow(web_app_session.session).start()
    return redirect(authorize_url)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Jul 2018 21:14:41 GMT</pubDate>
    <dc:creator>iamlordaubrey</dc:creator>
    <dc:date>2018-07-22T21:14:41Z</dc:date>
    <item>
      <title>Python DropboxOAuth2Flow Error: WSGIRequest' object does not support item assignment</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/262650#M15330</link>
      <description>&lt;P&gt;I'm trying to build a webapp&amp;nbsp;with Django and using dropbox&amp;nbsp;SDK v2 for Python. I'm stuck at Authentication and getting error that&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;WSGIRequest' object does not support item assignment&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from dropbox import DropboxOAuth2Flow
from django.shortcuts import redirect

def get_dropbox_auth_flow(web_app_session):
    redirect_uri = "https://www.my-dummy-server.com"
    APP_KEY = 'my-app-key'
    APP_SECRET = 'my-app-secret'
    return DropboxOAuth2Flow(
        APP_KEY, APP_SECRET, redirect_uri, web_app_session, "dropbox-auth-csrf-token")

def dropbox_auth_start(web_app_session):
    authorize_url = get_dropbox_auth_flow(web_app_session).start()
    return redirect(authorize_url)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Can&amp;nbsp;anyone please help?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:15:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/262650#M15330</guid>
      <dc:creator>abhannan</dc:creator>
      <dc:date>2019-05-29T09:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python DropboxOAuth2Flow Error: WSGIRequest' object does not support item assignment</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/262721#M15332</link>
      <description>&lt;P&gt;I changed the code to the following but still I'm not able to resolve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;dropbox_auth_start&lt;/SPAN&gt;(request&lt;SPAN&gt;, &lt;/SPAN&gt;web_app_session):&lt;BR /&gt;    &lt;SPAN&gt;if &lt;/SPAN&gt;request.method == &lt;SPAN&gt;'GET'&lt;/SPAN&gt;:&lt;BR /&gt;        authorize_url = get_dropbox_auth_flow(web_app_session).start()&lt;BR /&gt;        &lt;SPAN&gt;return &lt;/SPAN&gt;redirect(authorize_url)&lt;/PRE&gt;
&lt;P&gt;I'm learning dropbox API, isn't there any example / gist / tutorial that how OAuth authentication works in API. I'm not able to find anything on the internet.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Jan 2018 15:25:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/262721#M15332</guid>
      <dc:creator>abhannan</dc:creator>
      <dc:date>2018-01-28T15:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Python DropboxOAuth2Flow Error: WSGIRequest' object does not support item assignment</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/262802#M15339</link>
      <description>&lt;P&gt;[Cross-linking for reference: &lt;A href="https://stackoverflow.com/questions/48482899/dropbox-api-with-django-authentication" target="_blank"&gt;https://stackoverflow.com/questions/48482899/dropbox-api-with-django-authentication&lt;/A&gt; ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like your question is more about using Django itself than the Dropbox API, so I'm afraid I can't offer much help. It looks like you already got some help on this on StackOverflow anyway though.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's a basic outline of how you would use the OAuth app authorization flow in the&amp;nbsp;Dropbox Python SDK with&amp;nbsp;DropboxOAuth2Flow in the documentation here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.oauth.DropboxOAuth2Flow" target="_blank"&gt;https://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.oauth.DropboxOAuth2Flow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's not written for any particular web framework in particular, so you'd need to hook up the session and request information for whichever framework you are using (e.g., Django, in your case).&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 15:28:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/262802#M15339</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-01-29T15:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python DropboxOAuth2Flow Error: WSGIRequest' object does not support item assignment</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/285824#M17521</link>
      <description>&lt;P&gt;In case someone needs this:&lt;/P&gt;&lt;P&gt;The first argument passed is usually the request object. Simply&amp;nbsp;reference the session&amp;nbsp;object on&amp;nbsp;the request like so: web_app_session.session&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Updated:&lt;/P&gt;&lt;PRE&gt;from dropbox import DropboxOAuth2Flow
from django.shortcuts import redirect

def get_dropbox_auth_flow(web_app_session):
    redirect_uri = "https://www.my-dummy-server.com"
    APP_KEY = 'my-app-key'
    APP_SECRET = 'my-app-secret'
    return DropboxOAuth2Flow(
        APP_KEY, APP_SECRET, redirect_uri, web_app_session, "dropbox-auth-csrf-token")

def dropbox_auth_start(web_app_session):
    authorize_url = get_dropbox_auth_flow(web_app_session.session).start()
    return redirect(authorize_url)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 21:14:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Python-DropboxOAuth2Flow-Error-WSGIRequest-object-does-not/m-p/285824#M17521</guid>
      <dc:creator>iamlordaubrey</dc:creator>
      <dc:date>2018-07-22T21:14:41Z</dc:date>
    </item>
  </channel>
</rss>

