Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Jiho P.
10 years agoExplorer | Level 3
Dropbox Account Id vs UID
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!
Greg-DB
Dropbox Community Moderator
9 years agoThanks for the feedback everyone!
No, unfortunately there isn't a way to get these IDs or generate these links, but I'll be sure to pass this along as a feature request.
No, unfortunately there isn't a way to get these IDs or generate these links, but I'll be sure to pass this along as a feature request.
Tony001
9 years agoExplorer | Level 4
We are finishing up our API migration, and hit a bit of a snag here. The solution for mapping old account IDs (uid) to new account IDs (account_id) seems to be a proactive call to the V2 API with an existing token to retrieving account_id. Is this correct?
Does this mean that we need to get every user (we have tens of thousands) to use our app in some way so we can piggyback a call to get account_id before the V1 api is shut off? If a user takes a hiatus from our app and then tries to use it after the V1 API shutoff, there would be no way to associate the IDs at that point, correct?
I don't suppose there is a way for you folks to add uid to the get_current_account return?
Barring that, is there a better way to do this to prevent some users being caught on the outside of the transition?
Will existing tokens remain valid after the V1 shutoff?
- Greg-DB9 years ago
Dropbox Community Moderator
"The solution for mapping old account IDs (uid) to new account IDs (account_id) seems to be a proactive call to the V2 API with an existing token to retrieving account_id. Is this correct?"
That's correct, you should call /2/users/get_current_account with the existing access token to get the account_id.
"Does this mean that we need to get every user (we have tens of thousands) to use our app in some way so we can piggyback a call to get account_id before the V1 api is shut off? If a user takes a hiatus from our app and then tries to use it after the V1 API shutoff, there would be no way to associate the IDs at that point, correct?"
You don't technically need to do this before API v1 is retired. Also, you don't really need to wait for users to be active to make this API call. As long as you have the access token, e.g., for a server-side app, you can just make the API call whenever you'd like. (For a client-side app, yes, you'd have to have them run the app, since you presumably don't have the access token anywhere except on the client.)
"I don't suppose there is a way for you folks to add uid to the get_current_account return?"
I've sent this along as a feature request, but I don't have any news on that.
"Barring that, is there a better way to do this to prevent some users being caught on the outside of the transition?"
I do recommend just going through all of the existing access tokens to get and record the account_id.
"Will existing tokens remain valid after the V1 shutoff?"
Access tokens aren't being deactivated. In fact, if you have OAuth 2 access tokens, you can use those directly on API v2. (One exception there is if your app happens to use the "file type" permission, which isn't supported by API v2.) If you have OAuth 1 access tokens, you can migrate them to OAuth 2 using API v2's /2/auth/token/from_oauth1.
- jjsk9 years agoHelpful | Level 5> I've sent this along as a feature request, but I don't have any news on that.
another vote to for the 'legacy' UID number in the get_current_account call. My application uses UID as a primary key as well, and links it to several tables. A custom URL given to users is based on their UID. it's going to be really hard to convert old users to the new format without having to user's update their links.. Is there any way to bring back the old UID? The numeric id looked very clean and was easy to error check with a .isdigit() python call. no so with the new id. - jjsk9 years agoHelpful | Level 5
I just realized that DropboxOAuth2Flow still returns both UID and DBID. Can we count on this call staying as is?
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks for the additional feedback! I don't have an update on this, but I'm adding your vote to the request.
And yes, that's part of the OAuth 2 flow, which isn't changing.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!