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: 

How get app key in API 2?

How get app key in API 2?

Keith B.7
Helpful | Level 7
Go to solution

In API 1, I could get the app key like this:

 

NSString *cachedAppKey = ...
MPOAuthCredentialConcreteStore *store = [[DBSession sharedSession] credentialStoreForUserId:nil];
if (cachedAppKey == nil || [cachedAppKey isEqualToString:store.consumerKey] == NO)
{
    NSLog (@"App key changed since last use!", nil);
}

Is there a way of doing this in API 2?

 

The reason I do this is to check that the app hasn't had to change its app key for some reason, which would mess up delta keys for -listFolderContinue:. It's a bit of an edge-case, and the code is really only there because I had to switch between an app folder key and a full access key during beta-testing, so had to ensure an invalid delta value wasn't used after the change-over.

 

Thanks,

Keith

 

EDIT: Actually, I suppose I can just get it from the info.plist file directly, removing the "db-" prefix.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Yea, I don't believe the API v2 Objective-C SDK stores the app key in the credential store/keychain like the API v1 Core SDK does.

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

Yea, I don't believe the API v2 Objective-C SDK stores the app key in the credential store/keychain like the API v1 Core SDK does.

Keith B.7
Helpful | Level 7
Go to solution

Okay, thanks - I'll just grab it directly from the info.plist file, then.

 

All the best,
Keith

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Keith B.7 Helpful | Level 7
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?