cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Best way to know if a token is still valid?

Best way to know if a token is still valid?

axew3
Collaborator | Level 8
Go to solution

Hi all, i look into API docs endpoints, and i can't find out the correct way to establish if a token is still valid or not. Or better i could but a suggestion maybe is best ...

I mean this: on an user interface, the generated token is shown to user when he load his profile. Than i would like know before than the page load, if the token is active or not. Since no curl call is done on profile, except when the user click to request/generate a new token, when user load page, i could arbitrary do a curl call to check if error come out, and establish if the token is still valid, or has been maybe revoked by user via/into dropbox.com account.

What the best way?

I've not read something about somewhere (as this is very probably due to my Eng) maybe.

Thank you!

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The best way to check if an access token is still valid with the Dropbox API is just to make a call and check the response. For example, a simple call with no side effects such as /2/users/get_current_account is a good one for this.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

The best way to check if an access token is still valid with the Dropbox API is just to make a call and check the response. For example, a simple call with no side effects such as /2/users/get_current_account is a good one for this.

axew3
Collaborator | Level 8
Go to solution

:christmas_tree:  :relieved:  Thank you!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    axew3 Collaborator | Level 8
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?