The request is understood, but it has been refused. Twitter Code - 453

94 views Asked by At

I'm trying to post a tweet using Twitter's API. However, even though the developer portal states that I have access to post up to 50 tweets per 24 hours on the free plan, I receive an error when I send a request:

twitter4j.TwitterException: 403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
message - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product
code - 453

I'm using the Twitter4J library to send the post:

val twt4j= Twitter.newBuilder().oAuthAccessToken("oAuthAccessToken","oAuthAccessTokenSecret")
           .oAuthConsumer("oAuthConsumerKey","oAuthConsumerSecret")
           .build()
        twt4j.v1().tweets().updateStatus("sample 1")
        twt4j.v1().tweets().updateStatus("2")
  • I've gone through most of the documentation and the official website of the Twitter developer community website, but couldn't find a solution.

How can I fix this? Thank you:)

0

There are 0 answers