cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

How get app key in API 2?

Keith B.7
Helpful | Level 6

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

Re: How get app key in API 2?

Dropboxer
Dropboxer

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

Re: How get app key in API 2?

Dropboxer
Dropboxer

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

Re: How get app key in API 2?

Keith B.7
Helpful | Level 6

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

 

All the best,
Keith

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?