cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

Regex for Oauth 2.0 AccessToken

Naga Abhinaya T
Explorer | Level 4

Hi,

I am writing a regex for the Oauth2.0 Access Token. What are the possible special characters that can occur in that token? As far as I know, it contains '-' and '_'. Am I missing any special characters?

2 Replies 2

Re: Regex for Oauth 2.0 AccessToken

Dropboxer
Dropboxer

The Dropbox API doesn't make any guarantees about the exact format of an access token like this, so we don't recommend trying to validate them using a regex.

Further, access tokens can be revoked remotely anyway, so the only way to check if an access token is actually valid is to attempt an API call with it (e.g., most developers use the account information call, since there aren't any side effects) to check if it succeeds or fails.

Re: Regex for Oauth 2.0 AccessToken

Naga Abhinaya T
Explorer | Level 4

Hi Gregory,

Thanks for that explanation

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?