我正在尝试将google标记管理器容器的“发布”权限分配给电子邮件。
$gtm_user_access = new Google_Service_TagManager_UserPermission();
$gtm_user_access->setAccountId($accountId);
$gtm_user_access->setEmailAddress($email);
$account_access = new Google_Service_TagManager_AccountAccess();
$account_access->setPermission("admin");
$gtm_user_access->setAccountAccess($account_access);
$container_access = new Google_Service_TagManager_ContainerAccess();
$container_access->setContainerId($containerId);
$container_access->setPermission("publish");
$gtm_user_access->setContainerAccess($container_access);
$create_permission = $service->accounts_user_permissions->create("accounts/".$accountId, $gtm_user_access);`
更奇怪的是,仅“读”权限分配给了该电子邮件。