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: 

Dropbox Account Id vs UID

Dropbox Account Id vs UID

Jiho P.
Explorer | Level 3

Hello, I'm using Swifty dropbox and wanted to know the difference between accountId I get from getAccountId() call vs. the userId set in my shared client.

Thanks in advance!

22 Replies 22

Greg-DB
Dropbox Staff

These are just different formats for identifying Dropbox accounts. Is it causing any problems in your app?

Jiho P.
Explorer | Level 3

I'm trying to figure out which one to use to uniquely identify a user in a consumer app. Are they both globally unique? Which one makes more sense for me to use for this purpose?

Greg-DB
Dropbox Staff

They're both globally unique, but the longer one from getAccountId is preferred in general, and is required when interacting with the API v2 calls themselves, e.g., when specifying a user.

RTS S.
Helpful | Level 6

Is there  a way to get UID in Java API ? 

I have been using the UID as a user identifier in my APP ...

I have been able to access this in Swify and .NET

 

Greg-DB
Dropbox Staff

RTS, API v2 only uses the new account ID format, so we recommend moving to that if you're using API v2. You can use the getAccount method to get account information, including the account ID, from API v2 in the Java SDK. You can continue using API v1 methods if necessary though.

RTS S.
Helpful | Level 6

My app has been around since before V2 ... I already have UID in the database.

I have already converted OSX, IOS to V2, developed the .NET APP.

All of those have access to UID. 

Now you are recommending that I stay on V1 for android ? 

Is this a long term stable identifier ? 

 

Greg-DB
Dropbox Staff

API v1 isn't deprecated, so you can use it if you want, but we certainly recommend moving to API v2 when possible.

For API v2, you should use the account ID, which is stable. As part of migrating to API v2, you should get the account IDs. I.e., for any access token, call the getAccount method to get the corresponding account ID.

RTS S.
Helpful | Level 6

OK, but I hope this is stable for V3 .... 

user identification is critical for resource not maintained entirely on your server.

 

Arusnundar S.
New member | Level 1

I have been inserted the UID in the Database for unique purpose. It is an integer value. As i will integrate the V2 what i will do. 

For Example:

V1

User A : uid:123456

get the data from datatbase like as

Select * from User where uid=123456 -  Is working fine.

V2

User A : dbid:asd3-asdf ds 

Only coming the dbid is not there uid. How to migrate. Already 1000 user have uid. How to change dbid.

 

Please give solution.

 

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    jjsk Explorer | Level 4
  • User avatar
    Tony001 Explorer | Level 4
What do Dropbox user levels mean?