<?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 OAuth2 token with iOS SDK in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213553#M10862</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently migrating one of my iOS app to the V2 of the API.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When a user authorize my app to use its Dropbox account I want to retrieve the OAuth2 token to share it with my server to allow long running backgroud processes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked fine with the V1 of the API and still works fine in V2 when the authorization is made from a browser or a web view as the token is in the url returned by the SDK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when the auth is done by the Dropbox iOS app, the url returned in to the&lt;/P&gt;
&lt;PRE&gt;-application: openURL: options:&lt;/PRE&gt;
&lt;P&gt;method is different and provides an oauth_token_secret parameter but no access_token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I get the oauth2 token from the SDK knowing that the DBOAuthResult returns the same oauth_token_secret for its accessToken property in this case ? and not a valid oauth2 token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, is it possible to forbid the auth flow to use the installed Dropbox iOS app ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:24:22 GMT</pubDate>
    <dc:creator>thedeck</dc:creator>
    <dc:date>2019-05-29T09:24:22Z</dc:date>
    <item>
      <title>OAuth2 token with iOS SDK</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213553#M10862</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently migrating one of my iOS app to the V2 of the API.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;When a user authorize my app to use its Dropbox account I want to retrieve the OAuth2 token to share it with my server to allow long running backgroud processes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked fine with the V1 of the API and still works fine in V2 when the authorization is made from a browser or a web view as the token is in the url returned by the SDK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when the auth is done by the Dropbox iOS app, the url returned in to the&lt;/P&gt;
&lt;PRE&gt;-application: openURL: options:&lt;/PRE&gt;
&lt;P&gt;method is different and provides an oauth_token_secret parameter but no access_token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I get the oauth2 token from the SDK knowing that the DBOAuthResult returns the same oauth_token_secret for its accessToken property in this case ? and not a valid oauth2 token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, is it possible to forbid the auth flow to use the installed Dropbox iOS app ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:24:22 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213553#M10862</guid>
      <dc:creator>thedeck</dc:creator>
      <dc:date>2019-05-29T09:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 token with iOS SDK</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213605#M10869</link>
      <description>&lt;P&gt;Hi, it sounds like you're using the &lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c" target="_self"&gt;official API v2 Objective-C SDK&lt;/A&gt;. Is that correct? If so, the SDK handles the access token retrieval and storage for you, regardless of which flow exactly was used (e.g., via app or web). If you're using that SDK, you should just implement the authorization flow &lt;A href="https://github.com/dropbox/dropbox-sdk-obj-c#handle-redirect-back-into-sdk" target="_self"&gt;as documented here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will automatically store the token, and you can then retrieve the client via&amp;nbsp;DBClientsManager authorizedClient. That is, you don't need to check the URL parameters yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you then do want to retrieve the access token(s) themselves, you can use &lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBOAuthManager.html#/c:objc(cs)DBOAuthManager(im)getAccessToken:" target="_self"&gt;DBOAuthManager.getAccessToken&lt;/A&gt; or&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-obj-c/api-docs/latest/Classes/DBOAuthManager.html#/c:objc(cs)DBOAuthManager(im)getAllAccessTokens" target="_self"&gt;&lt;SPAN&gt;DBOAuthManager.&lt;/SPAN&gt;&lt;SPAN&gt;getAllAccessTokens&lt;/SPAN&gt;&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:18:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213605#M10869</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-28T14:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 token with iOS SDK</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213611#M10870</link>
      <description>&lt;P&gt;Thanks, that works perfectly!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 14:38:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/OAuth2-token-with-iOS-SDK/m-p/213611#M10870</guid>
      <dc:creator>thedeck</dc:creator>
      <dc:date>2017-03-28T14:38:40Z</dc:date>
    </item>
  </channel>
</rss>

