cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more 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: Access Code format/configuration

Access Code format/configuration

evepony
Explorer | Level 4

Hi everyone !

Anyone knows the difference between formats of access codes?

Something like this :

PSx_xx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

and

Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_x

I don't know if it's relationated with the expiration of tokens.

I hope you can help me please 🙂

 

3 Replies 3

Greg-DB
Dropbox Staff

The Dropbox API authorization functionality includes a number of different types of values, including authorization codes, access tokens, and refresh tokens. You can find the documentation for all of that here. Each of those are only specified as "String" without a more specific format guaranteed, so make sure you're not programming assumptions about the formats into your app's code.

 

For the 'access_token' value in particular, the access token's expiration information is included in the 'expires_in' field, per the documentation.

evepony
Explorer | Level 4

I've noticed about a difference in access codes:

3333.png

I have two Dropbox accounts, I created an app and I followed the auth flow for each account .

 

Account 1:

in this account all my access codes inits with PS:

111.png

 

Account 2:

In this account all my access codes doesn´t has a format like the first one:PSx_xx_

222.png

 

I want to know what is the difference because this situation it repeats when I share an app and I request the access  from another account the access code doesn't has the PS format.

 

 

Greg-DB
Dropbox Staff

These values may encode information about the relevant account, so you may notice patterns like this, but your app should not expect or rely on any particular format or pattern. Your app should only use the authorization code as supplied.

 

You should not attempt to decode or otherwise extract information from the authorization code itself. The format does not indicate the lifetime of the authorization code. Regardless of which account it came from, an authorization code can only be used once, and only for a short period of time.

Need more support?