【问题标题】:Revoke Access to the app Gmail API撤销对应用程序 Gmail API 的访问权限
【发布时间】:2020-10-06 19:54:40
【问题描述】:

如何从后端 Node.js 撤消对应用程序的访问权限 因为我们可以选择使用方法 refreshaccesstoken() 生成 access_token。那么有没有类似的方法 我可以使用它来撤消应用的访问权限。

【问题讨论】:

    标签: node.js gmail-api


    【解决方案1】:

    您可以通过access_tokenrefresh_token 发送请求来revoke a token programmatically

    POST https://oauth2.googleapis.com/revoke?token={token} HTTP/1.1
    Content-type: application/x-www-form-urlencoded
    

    【讨论】:

    • 嗨。如何访问 FileDataStore 中的令牌?我应该将它存储为我的实用程序的成员变量,然后可以使用它来撤销吗?或者我们可以读取他们文件夹中的 FileDataStore 对象并使用它吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-12
    • 1970-01-01
    • 2013-04-20
    • 2012-07-30
    • 2015-12-02
    • 1970-01-01
    相关资源
    最近更新 更多