#disclamire ini merupakaan package orang yang saya sesuaikan dengan php 8. kalo buat pr lama di acc jadi mendingan buat paket sendiri
composer require lactobasilus/filesystem-onedrive-php8
- Follow Azure Docs to obtain your
ClientId, ClientSecret & TenantId
- Follow OneDrive Docs to obtain your
refreshToken
$token=new \As247\CloudStorages\Support\OneDriveOauth();
$token->setClientId('[Client ID]');
$token->setTenantId('[Tenant ID]');
$token->setClientSecret('[Client secret]');
$token->setRefreshToken('[Refresh token]');
$graph = new \Microsoft\Graph\Graph();
$graph->setAccessToken($token->getAccessToken());
$adapter = new \As247\Flysystem\OneDrive\OneDriveAdapter($graph, '[root path]');
$filesystem = new \League\Flysystem\Filesystem($adapter);