This commit is contained in:
2025-11-06 00:13:02 +08:00
parent c771c99d6e
commit 8a678d409b
4 changed files with 46 additions and 0 deletions

View File

@@ -351,5 +351,17 @@ public class TencentDocApiUtil {
String apiUrl = String.format("%s/files/%s/sheets", apiBaseUrl, fileId);
return callApi(accessToken, apiUrl, "GET", null);
}
/**
* 获取用户信息
*
* @param accessToken 访问令牌
* @return 用户信息
*/
public static JSONObject getUserInfo(String accessToken) {
// 腾讯文档用户信息接口https://docs.qq.com/open/document/app/oauth2/userinfo.html
String apiUrl = "https://docs.qq.com/oauth/v2/userinfo";
return callApi(accessToken, apiUrl, "GET", null);
}
}