Category : onedrive

I am trying to retrieve the contents of shared Onedrive folders on Sharepoint sites for clients. In php with Guzzle I call the OneDrive api and the user token: https://api.onedrive.com/v1.0/shares/{TOKEN}/root?expand=children then I retrieve the content like this: $token = "****"; $url = preg_replace("/{TOKEN}/", $token, "https://api.onedrive.com/v1.0/shares/{TOKEN}/root?expand=children"); try { $res = $client->request("GET", $url, ["headers" => ["Content-Type" => ..

Read more

I am using the msgraph-sdk-php for uploading a file to a folder in One Drive. I have used composer on ubuntu to install the sdk.I am using PHP 7.4 I get the following error: GuzzleHttpExceptionClientException Client error: `PUT https://graph.microsoft.com/v1.0/me/drive/root/10-01- 2021/children/invoices_10-01-2021.xlsx/content` resulted in a `400 Bad Request` response: { "error": { "code": "BadRequest", "message": "Unable to ..

Read more