<?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: Got a token, but still no go on uploading in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Got-a-token-but-still-no-go-on-uploading/m-p/278126#M16656</link>
    <description>&lt;P&gt;Regarding the issue with not being able to log in, it's likely because the webviewer you're using is not &lt;A href="https://www.dropbox.com/help/desktop-web/system-requirements#web" target="_self"&gt;officially supported by the&amp;nbsp;Dropbox web site&lt;/A&gt;. You should use the system browser, instead of a web view, per &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank"&gt;the documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 401 issue is because you're attempting to use an "authorization code" as your "access token". The two are actually different; you need to perform one more step to exchange the authorization code for an actual access token. You can find more information on this in the Dropbox &lt;A href="https://www.dropbox.com/developers/reference/oauth-guide" target="_blank"&gt;OAuth guide&lt;/A&gt; and&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;documentation&lt;/A&gt;. This &lt;A href="https://blogs.dropbox.com/developers/2013/07/using-oauth-2-0-with-the-core-api/" target="_blank"&gt;old blog post&lt;/A&gt; may also be helpful. (It was written for API v1 a.k.a. the Core API, which is now retired, but the OAuth 2 part still works the same.)&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2018 15:02:39 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-05-29T15:02:39Z</dc:date>
    <item>
      <title>Got a token, but still no go on uploading</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Got-a-token-but-still-no-go-on-uploading/m-p/277843#M16639</link>
      <description>&lt;P&gt;I am using a webviewer (a control object on a FileMaker layout that acts like a browser) in my FileMaker solution to allow my&amp;nbsp;users to interact with Dropbox and my app. &amp;nbsp;I'm not sure if the problems I'm having are related to me being the app owner and then trying to act as another user, so I am describing everything here from what I encounter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I&amp;nbsp;go to the FileMaker layout, the webviewer fires up using this url:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;A href="https://www.dropbox.com/oauth2/authorize?client_id=" target="_blank"&gt;https://www.dropbox.com/oauth2/authorize?client_id=&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;myAppKey&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;&amp;amp;response_type=code&amp;amp;redirect_uri=&lt;A href="https://www.osaemr.com" target="_blank"&gt;https://www.osaemr.com&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The user (me) is directed to a&amp;nbsp;Dropbox login where I&amp;nbsp;have the opportunity to login either with Google or with their email and password for Dropbox.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried several time to login with my email address and password to Dropbox, but all I get is a spinner and nothing happens. &amp;nbsp;So I log in with Google, and it works - but again, this might be where errors are occuring. &amp;nbsp;If I go over to my Safari (MacOS) browser, I am able to log in to Dropbox with my email and password with no problems, but that doesnt' seem to help with my app in FileMaker.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once logged in (via Google), I am&amp;nbsp;taken to the App approval webpage, where I can approve my app&amp;nbsp;(OSAEMR). &amp;nbsp;Once I click on the button, I am taken to my redirect URI with the token appended to the URI. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I then parsed&amp;nbsp;the token out of the URL&amp;nbsp;and put it into the following cURL request to upload a file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--header "Authorization: Bearer &amp;lt;myTokenIjustGotFromTheURL&amp;gt;"&lt;/P&gt;
&lt;P&gt;--header "Dropbox-API-Arg: {\"autorename\":true,\"mode\":\"add\",\"mute\":false,\"path\":\"/OSAEMR/Testing/&amp;lt;myFileName&amp;gt;\"}"&lt;/P&gt;
&lt;P&gt;--header "Content-Type: application/octet-stream"&lt;/P&gt;
&lt;P&gt;--dump-header&amp;nbsp;&amp;lt;myVariableForErrorResults&amp;gt;&lt;/P&gt;
&lt;P&gt;--data-binary @&amp;lt;myFile&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And I get an error: "HTTP/1.1 100 Continue HTTP/1.1 401 invalid_access_token/. Server: nginx Date: Sat, 26 May 2018 15:49:38 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive WWW-Authenticate: Bearer realm="Dropbox-API" Content-Security-Policy: sandbox allow-forms allow-scripts X-Dropbox-Request-Id: 47b29bec3e175321811caf44afda0d9b X-Robots-Tag: noindex, nofollow, noimageindex "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOWEVER, if I substitute the token I generated for my app instead of the one provided by the redirect URL, it works fine. &amp;nbsp;Frustrating! &amp;nbsp;I hope you have enough info here to help me figure it out. &amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:13:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Got-a-token-but-still-no-go-on-uploading/m-p/277843#M16639</guid>
      <dc:creator>dsimonson</dc:creator>
      <dc:date>2019-05-29T09:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Got a token, but still no go on uploading</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Got-a-token-but-still-no-go-on-uploading/m-p/278126#M16656</link>
      <description>&lt;P&gt;Regarding the issue with not being able to log in, it's likely because the webviewer you're using is not &lt;A href="https://www.dropbox.com/help/desktop-web/system-requirements#web" target="_self"&gt;officially supported by the&amp;nbsp;Dropbox web site&lt;/A&gt;. You should use the system browser, instead of a web view, per &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#oauth2-authorize" target="_blank"&gt;the documentation&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 401 issue is because you're attempting to use an "authorization code" as your "access token". The two are actually different; you need to perform one more step to exchange the authorization code for an actual access token. You can find more information on this in the Dropbox &lt;A href="https://www.dropbox.com/developers/reference/oauth-guide" target="_blank"&gt;OAuth guide&lt;/A&gt; and&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#authorization" target="_blank"&gt;documentation&lt;/A&gt;. This &lt;A href="https://blogs.dropbox.com/developers/2013/07/using-oauth-2-0-with-the-core-api/" target="_blank"&gt;old blog post&lt;/A&gt; may also be helpful. (It was written for API v1 a.k.a. the Core API, which is now retired, but the OAuth 2 part still works the same.)&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 15:02:39 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Got-a-token-but-still-no-go-on-uploading/m-p/278126#M16656</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-05-29T15:02:39Z</dc:date>
    </item>
  </channel>
</rss>

