From f43dc3763003bdcead0b04cd6cc323930e169b12 Mon Sep 17 00:00:00 2001 From: zhangxiang <31364579+msterzhang@users.noreply.github.com> Date: Thu, 16 Feb 2023 14:12:36 +0800 Subject: [PATCH] Update Aliyundrive.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 invalid X-Device-Id --- disk/Aliyundrive.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/disk/Aliyundrive.php b/disk/Aliyundrive.php index 4d40d38..33e87f7 100644 --- a/disk/Aliyundrive.php +++ b/disk/Aliyundrive.php @@ -9,6 +9,7 @@ class Aliyundrive { //$this->auth_url = 'https://websv.aliyundrive.com/token/refresh'; $this->auth_url = 'https://auth.aliyundrive.com/v2/account/token'; $this->api_url = 'https://api.aliyundrive.com/v2'; + $this->api_url_v3 = 'https://api.aliyundrive.com/adrive/v3'; $this->driveId = getConfig('driveId', $tag); $res = $this->get_access_token(getConfig('refresh_token', $tag)); } @@ -182,7 +183,7 @@ class Aliyundrive { } protected function fileList($parent_file_id) { - $url = $this->api_url . '/file/list'; + $url = $this->api_url_v3 . '/file/list'; $header["content-type"] = "application/json; charset=utf-8"; $header['authorization'] = 'Bearer ' . $this->access_token;