<?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: Custom TransportClient with programatic auth flow in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211783#M10677</link>
    <description>I see, thanks for elaborating. In that case, you can just pass in "" as the access token in the DropboxTransportClient, and then use that with setupWithAppKey. It should still then use the automatic auth flow and client. Give that a try and let me know if it doesn't work for you. (We're planning on making this more obvious/usable in a future version.)</description>
    <pubDate>Wed, 15 Mar 2017 21:09:42 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2017-03-15T21:09:42Z</dc:date>
    <item>
      <title>Custom TransportClient with programatic auth flow</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211762#M10672</link>
      <description>&lt;P&gt;So, you must start with your AppDelegate calling this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;setupWithAppKey()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in order to later initiate the auth flow and retrieve an AccessToken, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SDK will remember your auth info next time and provide an `authorizedClient` – all good.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I want to use a custom `DropboxTransportClient` and the only point at which you can inject a certain / custom `DropboxTransportClient` is in:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;DropboxClientsManager.setupWithAppKey(DropboxUtil.key, transportClient: transportClient)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, once you've called setupWithAppKey once, you cannot call it again:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;precondition failed: Only call `DropboxClientsManager.setupWithAppKey` or `DropboxClientsManager.setupWithTeamAppKey` once: file Swift/Pods/SwiftyDropbox/Source/SwiftyDropbox/PlatformNeutral/DropboxClientsManager.swift, line 22&lt;/PRE&gt;&lt;P&gt;How can we use the nice programatic auth flow and also inject our own `DropboxTransportClient` ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to limit the number of simeltaneous uploads, and I think that is possible if I can control the Transport Client.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:24:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211762#M10672</guid>
      <dc:creator>200ok</dc:creator>
      <dc:date>2019-05-29T09:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom TransportClient with programatic auth flow</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211769#M10675</link>
      <description>&lt;P&gt;The auth flow and client retrieval should work regardless of which version of&amp;nbsp;setupWithAppKey you used, so you should be able to just use the one that takes a transport client in the first place.&amp;nbsp;Does that work for you?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 20:48:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211769#M10675</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-15T20:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Custom TransportClient with programatic auth flow</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211779#M10676</link>
      <description>&lt;P&gt;Hey Greg, thanks. Let me clarify the problem. I wish to inject a custom DropboxTransportClient.&amp;nbsp;Creating a&amp;nbsp;&lt;SPAN&gt;DropboxTransportClient&lt;/SPAN&gt;&amp;nbsp;requires an AccessToken (first constructor argument). I cannot have the user fetch his/her own access token until I've already called setupWithAppKey once, after which I cannot call setupWithAppKey again. The only injection point for a `TransportClient` is calling the overloaded version of `s&lt;SPAN&gt;etupWithAppKey`, which can only be called once.&lt;/SPAN&gt;&amp;nbsp;– I'm sure I'm misunderstanding something.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 21:09:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211779#M10676</guid>
      <dc:creator>200ok</dc:creator>
      <dc:date>2017-03-15T21:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom TransportClient with programatic auth flow</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211783#M10677</link>
      <description>I see, thanks for elaborating. In that case, you can just pass in "" as the access token in the DropboxTransportClient, and then use that with setupWithAppKey. It should still then use the automatic auth flow and client. Give that a try and let me know if it doesn't work for you. (We're planning on making this more obvious/usable in a future version.)</description>
      <pubDate>Wed, 15 Mar 2017 21:09:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211783#M10677</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2017-03-15T21:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom TransportClient with programatic auth flow</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211810#M10682</link>
      <description>&lt;P&gt;That seems to work just fine indeed, thank you. Wasn't clear at first since there is&amp;nbsp;no empty initializer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do have related questions but I will put them off for a time when I can give you the great examples you deserve!!! Thanks for the excellent support. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 22:47:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Custom-TransportClient-with-programatic-auth-flow/m-p/211810#M10682</guid>
      <dc:creator>200ok</dc:creator>
      <dc:date>2017-03-15T22:47:44Z</dc:date>
    </item>
  </channel>
</rss>

