Hello

I’m trying to post a tweet and I’m getting the error code below. I checked my credentials and they are correct, I believe it is my developer account that does not have read and write permissions.

java language and I’m using twitter4j

Exception in thread “main” 401:Authentication credentials (/dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
{“request”:“/1.1/statuses/update.json”,“error”:“Read-only application cannot POST.”}

twitter4j is using v1.1 API, and new developer accounts only have access to v2 API. You either have to use a v2 library like GitHub - takke/twitter4j-v2: a simple wrapper for Twitter API v2 that is designed to be used with Twitter4J or apply for elevated access to get v1.1

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.