A
A
Alexander2019-04-29 22:16:55
PHP
Alexander, 2019-04-29 22:16:55

How to get permission details in PHP via Google drive API v3?

With the help of a service account, I get access rights identifiers (permission id). Next, I need to get detailed information on the access rights to the folder. But I can't get any detailed information. Specifically, you need to clarify this particular folder access right or inherited.

$folder_Id = $file->id;  // айди папки

$optParams = array(
'fields' => "*"
);      

$permission = 'xxxxxxxxxxxxxxxxx'; // айди права доступа

$perm    = new Google_Service_Drive($client);
$request = $perm->permissions->get($folder_Id, $permission, $optParams);

I get some information, but not specifically detailed.
"permissionDetails": [
    {
      "permissionType": string,
      "role": string,
      "inheritedFrom": string,
      "inherited": boolean
    }
  ]

I put an asterisk in the fields parameter, and explicitly indicated the fields, but the request does not return any detailed information.
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question