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

[bug] #473

Open
Magendran123 opened this issue May 16, 2023 · 2 comments
Open

[bug] #473

Magendran123 opened this issue May 16, 2023 · 2 comments

Comments

@Magendran123
Copy link

Magendran123 commented May 16, 2023

Describe the bug
A clear and concise description of what the bug is.

using your package i can able to post a tweet successfully. thank you for that. but i cannot able to reply a tweet using your package.

To Reproduce
Please indicate all steps that lead to this bug:

  1. Request client setup (login method, OAuth2 scopes if applicable...)

const client = new TwitterApi({
appKey: config.twitter_config.api_key,
appSecret: config.twitter_config.api_secret,
accessToken: config.twitter_config.access_token,
accessSecret: config.twitter_config.access_secret,
});
using these authentication. works for create a tweet.

** Endpoint used**

  1. Endpoint used or code example of what's happening wrong
    async function replyToTweet() {
    try {

     	let tweet =  await twitterClient.v1.reply('Look at my video!', 1657981147555717120);
     	  console.log('Reply sent successfully:', tweet.text);
     	} catch (error) {
     	  console.error('Error replying to tweet:', error.data);
     	}
       }
    

Error stack trace

  1. Error stack trace, and if possible, error content (err.toJSON() when err is the caught error; take care of removing authentication HTTP headers)

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

Expected behavior
A clear and concise description of what you expected to happen.

*i want to post reply in tweet

Version

  • Node.js version - 14
  • Lib version - "twitter-api-v2": "^1.14.2",
  • OS (especially if you use Windows) - windows

Additional context
Add any other context about the problem here.

Screenshot (507)

@sarathkmrdev
Copy link

hi @Magendran123
I am getting same error while creating tweet.
found any fix ?
can you share your code used for creating tweet?

@muhitrhn
Copy link

Applications can't create tweets, only users can.

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

3 participants