I will never be able to revoke my OAuth2 access_token ever. HELP


I can obtain the OAuth2 token, but can’t revoke it.

Reproducing the error:

    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")
        .catch( e=> {
            console.log("Failed to revoke")

then I get

    Failed to revoke
    { errors:
       [ { code: 348,
            'Client application is not permitted to to invalidate this token.' } ] }

Tried googling but nothing came out of the code 348 and the message. The http error code is 401 (unauthorized).

I will never be able to revoke my OAuth2 token. Help.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.