public static function BearerTokenInfos::get in Backup and Migrate Dropbox 7.3
Returns a bearer token for the current Dropbox destination
Parameters
string $id: The id (machine name) of the current Dropbox destination.
Return value
string|null A bearer token for the current Dropbox destination, if stored and still valid, null otherwise
1 call to BearerTokenInfos::get()
- BackupMigrateDropboxAPI::get_bearer_token in ./
backup_migrate_dropbox.dropbox_api.inc - Returns a short lived but not yet expired bearer token.
File
- ./
backup_migrate_dropbox.dropbox_api.inc, line 872
Class
- BearerTokenInfos
- Class BearerTokenInfos manages the bearer tokens.
Code
public static function get($id) {
$bearer_tokens = BearerTokenInfos::get_all();
return isset($bearer_tokens[$id]) ? $bearer_tokens[$id]->access_token : NULL;
}