Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 google java 令牌以编程方式使用刷新令牌获取新的 google 访问令牌。
我发现了以下代码,它是获取新访问令牌的有效解决方案,并且可能还有其他替代方法:-TokenResponse response = new GoogleRefreshTokenRequest(httpTransport, jsonFactory, token, clientId, clientSecret).execute();在代码响应中可用于再次生成各种谷歌服务,这里令牌是响应令牌。
TokenResponse response = new GoogleRefreshTokenRequest(httpTransport, jsonFactory, token, clientId, clientSecret).execute();