Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
200ok
9 years agoNew member | Level 2
Custom TransportClient with programatic auth flow
So, you must start with your AppDelegate calling this: setupWithAppKey() in order to later initiate the auth flow and retrieve an AccessToken, etc. The SDK will remember your auth info...
- 9 years agoI 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.)
Greg-DB
Dropbox Community Moderator
9 years agoThe auth flow and client retrieval should work regardless of which version of setupWithAppKey you used, so you should be able to just use the one that takes a transport client in the first place. Does that work for you?
200ok
9 years agoNew member | Level 2
Hey Greg, thanks. Let me clarify the problem. I wish to inject a custom DropboxTransportClient. Creating a DropboxTransportClient 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 `setupWithAppKey`, which can only be called once. – I'm sure I'm misunderstanding something.
- Greg-DB9 years ago
Dropbox Community Moderator
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.)- 200ok9 years agoNew member | Level 2
That seems to work just fine indeed, thank you. Wasn't clear at first since there is no empty initializer.
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. :)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!