1. 获取API密钥
在"API密钥"标签页创建一个新的API密钥,保存好您的 Client ID 和 Client Secret。
2. 换取短期Token
curl -X POST https://01pan.cn/api/openapi/token.php \
-H "Content-Type: application/json" \
-H "X-Client-Id: your_client_id" \
-H "X-Client-Secret: your_client_secret" \
-d '{"grant_type":"client_credentials","scope":"direct_links.read stats.read","expires_in":900}'
3. 调用API
curl -X GET https://01pan.cn/api/openapi/direct-links.php \
-H "Authorization: Bearer your_access_token"