We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

vewert's avatar
vewert
Explorer | Level 4
4 years ago

How to set clientIdentifier, using SwiftyDropbox

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

  • 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.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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.

    • vewert's avatar
      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?

       

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        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.