node-twitter-api-v2
node-twitter-api-v2 copied to clipboard
[bug]
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:
- 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**
-
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
- Error stack trace, and if possible, error content (
err.toJSON()whenerris 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.
hi @Magendran123
I am getting same error while creating tweet.
found any fix ?
can you share your code used for creating tweet?
Applications can't create tweets, only users can.