We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
katharina
9 years agoExplorer | Level 3
Re-authenticate using access token
Hi, i get access token in my app using dropbox api. i want to reauthenticate in the same app on other device using these access token. How i can program it in objective c. Kinldy provide me solutions...
katharina
9 years agoExplorer | Level 3
Yes, i have all access token, token sercert, user id, And i use this all in such way.
1. I create a method for the updateToken as below and in this method i am fetching the folder of dropbox.
2 I call this method to update token in viewDid Load
3 When i run the app, it did not display the folder of the dropbox and even do not that it is logged in the dropbox using updated access or not.
- (void)viewDidLoad
{
[super viewDidLoad];
[self updateAccessToken:@"zu7k2w75btivr" accessTokenSecret:@"ndxj3c5u4kzp3" forUserId:@"653926434"];
}
//update access token method
- (void)updateAccessToken:(NSString *)token accessTokenSecret:(NSString *)secret forUserId:(NSString *)userId
{
[self.restClient loadMetadata:@"/"];
}
Error---
[WARNING] DropboxSDK: error making request to /1/account/info - (400) invalid_request [WARNING] DropboxSDK: error making request to /1/metadata/dropbox - (400) invalid_request
Greg-DB
Dropbox Community Moderator
9 years agoThanks! That's helpful. It looks like you're defining your own updateAccessToken method. That's actually an existing method on DBSession though. You shouldn't define your own. You should call that on your DBSession instance before attempting API calls such as loadMetadata.
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!