cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know more about how you can find anything and protect everything? Check it out 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: 

Re: short-lived access tokens

short-lived access tokens

Ditza
Explorer | Level 3
Go to solution

Hi,

My company has an application that uses dropbox API, to upload files to drop box.
We got an email that said that there is an update in the access token.

I tried to understand if it will affect our application, and we should move to the new API, but I wasn't sure.
We are using a 
long-life access token. I understand that now we will get a short one. but I can't figure out what does short means.
1. For how long did it live before it expiered? 

2. It expired only if I don't use the API for XXX time, or it expired also if I interact with the API all the time

3. Another question, a new user can use the old API? We are using 

versionSDK = "5.0.0"

 

Thanks 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The new authorization functionality was added in v6.0.0, so you'll want to use the latest version after that which you can support in your project. You can find the release history here. The Alamofire dependency was updated in v8.0.0, so you may want to try the latest before that, v7.0.1. Otherwise, if that doesn't work due to Swift compatibility, you may need to use v6.0.2.

View solution in original post

3 Replies 3

Greg-DB
Dropbox Staff
Go to solution

1. The API includes information about the expiration of a short-lived access token when returning it. (It's four hours, but you should use the value returned by the API.) If you're using an SDK, it will translate these API responses for you automatically.

2. Short-lived access token expiration does not rely on whether or not the access token is or was being actively used.

3. Access to this API functionality does not depend on the age of the account.

Ditza
Explorer | Level 3
Go to solution

O.k. so I want to update for the knew short-life tokens.

I am using:

1. Xcode 12.5.1

2. swift 4.2
3. minimum deployment target -> ipad iOS 14.0

4. SwiftyDropbox 5.0.0

 


I looked in GitHub readme and I saw I need to use this function 

authorizeFromControllerV2

Which is not included in my SDK 
I wanted to update the SDK version to 8.0.0 but so that the system requirements are not suited for mine. I still using swift 4.2.

I tried to force updating to 8.0.0 and got error

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Alamofire":
  In snapshot (Podfile.lock):
    Alamofire (= 4.7.3, ~> 4.3, ~> 4.7.3)

  In Podfile:
    Alamofire (~> 4.3)

    SwiftyDropbox (~> 8.0.1) was resolved to 8.0.1, which depends on
      Alamofire (~> 5.4.3)

Specs satisfying the `Alamofire (~> 4.3), Alamofire (= 4.7.3, ~> 4.3, ~> 4.7.3), Alamofire (~> 5.4.3)` dependency were found, but they required a higher minimum deployment target.

 

Is there is a way to use the new short-life token without changing my swift version and my minimum target version?

Greg-DB
Dropbox Staff
Go to solution

The new authorization functionality was added in v6.0.0, so you'll want to use the latest version after that which you can support in your project. You can find the release history here. The Alamofire dependency was updated in v8.0.0, so you may want to try the latest before that, v7.0.1. Otherwise, if that doesn't work due to Swift compatibility, you may need to use v6.0.2.

Need more support?