cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We're looking to hear about your experience when using Dropbox in a web browser. What parts of Dropbox feels very slow to you and takes a lot of time to get done? What are you trying to do in the Dropbox web browser when you experience slowness? Tell us right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
1
Ask
2
Comments

How to set clientIdentifier, using SwiftyDropbox

How to set clientIdentifier, using SwiftyDropbox

vewert
Explorer | Level 4

In the Java API, a clientIdentifier is set when creating a DbxRequestConfig object. I'm wondering, is there an equivalent in SwiftyDropbox? I was trying to search it myself, but it seem like the link (http://dropbox.github.io/SwiftyDropbox/api-docs/latest/ ) to the SwiftyDropbox api docs is broken.

 

Thanks

1 Accepted Solution

Accepted Solutions

Re: How to set clientIdentifier, using SwiftyDropbox

Greg-DB
Dropboxer

Yes, those are optional so you can set them to nil, except for "accessToken", but it looks like you can just set that to an empty string, assuming you're using the standard authorization functionality such as authorizeFromControllerV2 and authorizedClient which will take care of that for you.

View solution in original post

5 Replies 5

Re: How to set clientIdentifier, using SwiftyDropbox

Greg-DB
Dropboxer

Thanks for letting us know about the broken docs page! I'll ask the team to fix that up.

 

Anyway, the equivalent of setting that custom identifier in the SwiftyDropbox SDK would be to set the "userAgent" parameter when making a "DropboxTransportClient", like seen here.

Re: How to set clientIdentifier, using SwiftyDropbox

vewert
Explorer | Level 4

Thanks Greg,

 

I looked at the sample. How do I create a DropboxTransportClient, if all I want to do is set the userAgent; can I set all the other parameters to nil, to get the default behaviour?

 

Re: How to set clientIdentifier, using SwiftyDropbox

Greg-DB
Dropboxer

Yes, those are optional so you can set them to nil, except for "accessToken", but it looks like you can just set that to an empty string, assuming you're using the standard authorization functionality such as authorizeFromControllerV2 and authorizedClient which will take care of that for you.

Re: How to set clientIdentifier, using SwiftyDropbox

vewert
Explorer | Level 4

Thanks, that seems to work.

 

Also, I noticed the link to the documentation now works, so thanks for that as well.

 

One side question, I was looking through the documentation, but other than the example code, I couldn't find the actual api documentation for DropboxTransportClient (listing its Declaration, Parameters, etc.), I'm not sure if I just can't find it, or if its not there.

Re: How to set clientIdentifier, using SwiftyDropbox

Greg-DB
Dropboxer

Yes, we got the docs back up. It looks like the DropboxTransportClient class in particular isn't being included in the documentation though. I'll see if we can get that done.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    vewert Explorer | Level 4
What do Dropbox user levels mean?
Need more support?