TwitterOAuth2 token撤销返回401错误,显示“撤销”;不允许客户端应用程序使此令牌无效。”;

TwitterOAuth2 token撤销返回401错误,显示“撤销”;不允许客户端应用程序使此令牌无效。”;,twitter,oauth-2.0,axios,twitter-oauth,Twitter,Oauth 2.0,Axios,Twitter Oauth,我可以获得OAuth2令牌,但无法撤销它 再现错误: let token_url = "https://api.twitter.com/oauth2/token"; let revoke_url = "https://api.twitter.com/oauth2/invalidate_token" let auth = { username: CLIENT_API_KEY, password: CLIENT_API_SECRET_KEY } axios.post(token_ur

我可以获得OAuth2令牌,但无法撤销它

再现错误:

let token_url = "https://api.twitter.com/oauth2/token";
let revoke_url = "https://api.twitter.com/oauth2/invalidate_token"
let auth = {
    username: CLIENT_API_KEY,
    password: CLIENT_API_SECRET_KEY
}
axios.post(token_url, "grant_type=client_credentials", { auth })
.then( response => {
    let access_token = response.data["access_token"]
    axios.post(revoke_url, `access_token=${access_token}`, { auth })
    .then( response => {
        console.log("REVOKE SUCCESS")
        console.log(response)
    })
    .catch( e=> {
        console.log("Failed to revoke")
        console.log(e.response.data)
    })
})
然后我得到

Failed to revoke
{ errors:
   [ { code: 348,
       message:
        'Client application is not permitted to to invalidate this token.' } ] }
尝试过谷歌搜索,但代码348和消息都没有显示出来。http错误代码为
401(未经授权)


我将永远无法撤销我的OAuth2令牌。帮助。

你能找到这个问题的答案吗?@RandikaVishman我将问题发布在上并发布。在上一篇文章中,“Andrypiper”说“我们正在研究并意识到这一点,但基础设施的改变意味着这一点尚未得到优先考虑。我现在无法提供时间表。”