Skip to content

Scope in Create a sharing link for a DriveItem #119

Description

@jorgebherron

Hello, it seems that Microsoft has changed its file sharing policies and now, by default, it shares files with the users you specify, rather than anonymously as before.
The function located in DriveItemProxy does not include the scope parameter to specify the type of link to create.
To do this, I have modified this function so that it supports this parameter and takes it into account.

public function createLink($type,$scope, array $options = []) { $driveLocator = "/drives/{$this->parentReference->driveId}"; $itemLocator = "/items/{$this->id}"; $endpoint = "$driveLocator$itemLocator/createLink"; $body = [ 'type' => $type, 'scope' => $scope, ];
and call
[DriveItemProxy Element]->createLink("blocksDownload","anonymous");
Please take this into account in future versions. Thanks you very much for your work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions