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

When authenticating requests to the Twitter API v2 endpoints #64

Open
dong-yh opened this issue Jul 22, 2023 · 0 comments
Open

When authenticating requests to the Twitter API v2 endpoints #64

dong-yh opened this issue Jul 22, 2023 · 0 comments

Comments

@dong-yh
Copy link

dong-yh commented Jul 22, 2023

TwitterCredentialsOAuth2 twitterCredentialsOAuth2 = new TwitterCredentialsOAuth2(xxx, xxx, xxx, xxx);
TwitterApi apiInstance = new TwitterApi(twitterCredentialsOAuth2);
apiInstance.tweets().createTweet(new TweetCreateRequest().text("hellow world"));

{"client_id":"27512824","detail":"When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.","registration_url":"https://developer.twitter.com/en/docs/projects/overview","title":"Client Forbidden","required_enrollment":"Appropriate Level of API Access","reason":"client-not-enrolled","type":"https://api.twitter.com/2/problems/client-forbidden"}

When I push Twitter, I report an error and I guarantee that my app is not a standalone app in the project 。 What permissions do I need to activate。

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

2 participants
@dong-yh and others