We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Naga Abhinaya T's avatar
Naga Abhinaya T
Explorer | Level 4
10 years ago

Regex for Oauth 2.0 AccessToken

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

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 days ago
411 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!