linvi / tweetinvi

Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)...
MIT License
1.01k stars 220 forks source link

How to use the library with just client id and access token? #1184

Open grofit opened 2 years ago

grofit commented 2 years ago

I have a native app scenario where we already have a PKCE OAuth2 flow in place to get the users access token and it is refreshed within the app, but it seems like you require far more than that to make API calls but the api docs imply for V2 you can get by with just the access token.

I have tried doing:

var twitterCredentials = new TwitterCredentials() { AccessToken = AppState.GetTwitterOAuthToken() };
var twitterApi = new TwitterClient(twitterCredentials);
// make calls on v2 endpoints

It just blows up giving me unauthorised etc though.