如何将访问令牌附加到Google表格V4请求?

时间:2016-08-17 04:41:50

标签: android google-api spreadsheet

我发现了如何获取Google Spreadsheets V4的访问令牌。但是......我不知道如何将访问令牌附加到凭证:

        mCredential = GoogleAccountCredential.usingOAuth2(getApplicationContext(), Arrays.asList(SCOPES));

在以前的Google表格v3 API中,我完全理解如何在requestfactory或类似的函数调用中添加访问键,然后返回服务对象。

有没有办法在Google表格v4中做同样的事情?

1 个答案:

答案 0 :(得分:1)

有方法

setAccessToken();请参阅文档here

有关详细信息,请参阅official dev page