Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Could not authenticate you.' #581

Open
mikeymurph77 opened this issue Dec 27, 2022 · 4 comments
Open

'Could not authenticate you.' #581

mikeymurph77 opened this issue Dec 27, 2022 · 4 comments

Comments

@mikeymurph77
Copy link

I am trying to log in to post tweets on behalf of my own account from my app. I have not been able to move past the following error:

{ errors: [ { code: 32, message: 'Could not authenticate you.' } ] }

Previously I was using a different Twitter client which had issues with authentication and how my keys were generated.

The following is my code that fails to authenticate.

// /utils/twitterConfig.js
module.exports = {
  consumer_key: process.env.TWITTER_API_KEY,
  consumer_secret: process.env.TWITTER_API_SECRET,
  access_token: process.env.TWITTER_ACCESS_TOKEN,
  access_token_secret: process.env.TWITTER_ACCESS_SECRET,
};
// index.js
import twitterConfig from "../utils/twitterConfig";
import twit from "twit";
...
const Twitter = new twit(twitterConfig);
const tweets = Twitter.get(
        "search/tweets",
        { q: "banana since:2011-07-11", count: 100 },
          function (err, data, response) {
            console.log(data);
        }
);

Any idea what's going on here?

@ShayanJa
Copy link

ShayanJa commented Jan 4, 2023

Believe you need elevated access on twitter api

@tylerpashigian
Copy link

Did you ever figure this out? I just started getting this on a combination of keys/secrets that have been working for months. Do you know if this is related to the new twitter API rate limit?

@geneoes
Copy link

geneoes commented May 24, 2023

Did you ever figure this out? I just started getting this on a combination of keys/secrets that have been working for months. Do you know if this is related to the new twitter API rate limit?

@tylerpashigian happening the same to me here, did you figure this out already?

@tylerpashigian
Copy link

Did you ever figure this out? I just started getting this on a combination of keys/secrets that have been working for months. Do you know if this is related to the new twitter API rate limit?

@tylerpashigian happening the same to me here, did you figure this out already?

Yeah, it looks like the new API changes finally went into effect. If you go to your developer dashboard for the account you're trying to access, you'll see that account/project is suspended (assuming you have the same issue I did).

I just had to select an API tier (I selected free) and agree to it, I was good to go after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants