You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
Alex_Shekunsky
8 years agoExplorer | Level 4
Get user's account info
Hi!
I need help.
How i can get linked user's dropbox account info (name/email) in Objective-c by API v2 ?
In v1 i did this by
[self.restClient loadAccountInfo];
in method:
- (void)restClient:(DBRestClient*)client loadedAccountInfo:(DBAccountInfo*)info
Thanks!
If you're using the API v2 Objective-C SDK, the equivalent method is getCurrentAccount:
Here's an example of how you would make an "RPC-style" request like that (for creating a folder in this case):
https://github.com/dropbox/dropbox-sdk-obj-c#rpc-style-request
Xcode should auto-complete most of the boilerplate code for you though.
- Greg-DBDropbox Staff
If you're using the API v2 Objective-C SDK, the equivalent method is getCurrentAccount:
Here's an example of how you would make an "RPC-style" request like that (for creating a folder in this case):
https://github.com/dropbox/dropbox-sdk-obj-c#rpc-style-request
Xcode should auto-complete most of the boilerplate code for you though.
- Alex_ShekunskyExplorer | Level 4
Thank you very much!
- tomsaxNew member | Level 2
If you have a DBUserClient object (e.g. from [DBClientsManager authorizedClient]), you can get the info for that account with this call:
[[client.usersRoutes getCurrentAccount] setResponseBlock:^(DBUSERSFullAccount * _Nullable result, DBNilObject * _Nullable routeError, DBRequestError * _Nullable networkError) { if (networkError != nil) { NSLog(@"getCurrentAccount failed: network error"); } else if (routeError != nil) { NSLog(@"getCurrentAccount failed: route error"); } else { NSLog(@"got Dropbox account email: %@", result.email); } }];
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,883 PostsLatest Activity: 45 minutes agoIf 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!