FeedHive/twitter-api-client

Cannot use tweetsV2.searchAllTweets

ludovicoloreti opened this issue · 0 comments

Description
I see that is possible to use tweetsV2.searchAllTweets. But when I try, it gives me this error:

{
  statusCode: 403,
  data: '{\n' +
    '  "title": "Unsupported Authentication",\n' +
    '  "detail": "Authenticating with OAuth 1.0a User Context is forbidden for this endpoint.  Supported authentication types are [OAuth 2.0 Application-Only].",\n' +
    '  "type": "https://api.twitter.com/2/problems/unsupported-authentication",\n' +
    '  "status": 403\n' +
    '}'
}

To reproduce

const twitterClient = new TwitterClient({
  apiKey: "***",
  apiSecret: "***",
  accessToken: "***",
  accessTokenSecret: "***",
  disableCache: true,
  ttl: 120,
});


twitterClient.tweetsV2.searchAllTweets({
  query: "test"
}).then((response) => {
    console.log(response || "");
  })
  .catch((err) => console.error(err));

Is it possible to do it or not?

Thanks!!!