<?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: Malformed authorize_url returned from DropboxOAuth2FlowNoRedirect.start() in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428204#M22796</link>
    <description>&lt;P&gt;I see, thanks for the information!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jun 2020 20:13:51 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-06-09T20:13:51Z</dc:date>
    <item>
      <title>Malformed authorize_url returned from DropboxOAuth2FlowNoRedirect.start() Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428151#M22787</link>
      <description>&lt;P&gt;I am trying to use the `&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;DropboxOAuth2FlowNoRedirect` example in the Python class docstring. It looks like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN class="ansi-blue-intense-fg ansi-bold"&gt;from dropbox import DropboxOAuth2FlowNoRedirect

auth_flow = DropboxOAuth2FlowNoRedirect(APP_KEY, APP_SECRET)

authorize_url = auth_flow.start()
print("1. Go to: " + authorize_url)
print("2. Click \\"Allow\\" (you might have to log in first).")
print("3. Copy the authorization code.")
auth_code = raw_input("Enter the authorization code here: ").strip()

try:
    oauth_result = auth_flow.finish(auth_code)
except Exception as e:
    print('Error: %s' % (e,))
    return

dbx = Dropbox(oauth_result.access_token)&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;The resulting `authorize_url` seems to be malformed: it includes "&amp;amp;amp;" instead of just "&amp;amp;", meaning when navigating to it, Dropbox returns an error:&amp;nbsp;&lt;SPAN&gt;unknown field "amp". Is this a bug or am I doing something wrong?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 19:47:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428151#M22787</guid>
      <dc:creator>aplowman</dc:creator>
      <dc:date>2020-06-09T19:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed authorize_url returned from DropboxOAuth2FlowNoRedirect.start()</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428161#M22790</link>
      <description>&lt;P&gt;Thanks for the report. This issue doesn't seem to reproduce for me though. To help us investigate, can you share:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the version of the&amp;nbsp;Dropbox Python library you have installed&lt;/LI&gt;
&lt;LI&gt;the version of Python you're using&lt;/LI&gt;
&lt;LI&gt;the full output you get&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 09 Jun 2020 18:42:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428161#M22790</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-06-09T18:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed authorize_url returned from DropboxOAuth2FlowNoRedirect.start()</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428194#M22794</link>
      <description>&lt;P&gt;Ah. It is something to do with Jupyter Lab. The URL is fine in the iPython REPL and in Jupyter notebook. I am using the Python dropbox package version 10.1.1 and Python 3.8.2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from dropbox import DropboxOAuth2FlowNoRedirect, Dropbox

auth_flow = DropboxOAuth2FlowNoRedirect(APP_KEY, APP_SECRET)
authorize_url = auth_flow.start()

print("1. Go to: " + authorize_url)
print("2. Click \"Allow\" (you might have to log in first).")
print("3. Copy the authorization code.")

auth_code = input("Enter the authorization code here: ").strip()
try:
    oauth_result = auth_flow.finish(auth_code)
except Exception as e:
    print('Error: %s' % (e,))

dbx = Dropbox(oauth_result.access_token)&lt;/PRE&gt;&lt;P&gt;in a cell within Jupyter Lab, I get the following output (with client ID removed):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lm-Widget p-Widget lm-Panel p-Panel jp-Cell-outputWrapper"&gt;&lt;DIV class="lm-Widget p-Widget jp-OutputArea jp-Cell-outputArea"&gt;&lt;DIV class="lm-Widget p-Widget lm-Panel p-Panel jp-OutputArea-child"&gt;&lt;DIV class="lm-Widget p-Widget jp-RenderedText jp-mod-trusted jp-OutputArea-output"&gt;&lt;PRE&gt;1. Go to: &lt;A href="https://www.dropbox.com/oauth2/authorize?response_type=code&amp;amp;amp;client_id=ortg7tuio50jos4" target="_blank" rel="noopener"&gt;https://www.dropbox.com/oauth2/authorize?response_type=code&amp;amp;amp;client_id=REMOVED&lt;/A&gt;
2. Click "Allow" (you might have to log in first).
3. Copy the authorization code.&lt;BR /&gt;Enter the authorization code here:&lt;/PRE&gt;&lt;P&gt;Anyway, this isn't a problem for me, now that I know the URL is properly formed outside of Jupyter Lab.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 19:46:35 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428194#M22794</guid>
      <dc:creator>aplowman</dc:creator>
      <dc:date>2020-06-09T19:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Malformed authorize_url returned from DropboxOAuth2FlowNoRedirect.start()</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428204#M22796</link>
      <description>&lt;P&gt;I see, thanks for the information!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jun 2020 20:13:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Malformed-authorize-url-returned-from/m-p/428204#M22796</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-06-09T20:13:51Z</dc:date>
    </item>
  </channel>
</rss>

