To setup your application with Tweetinvi, you will need to have your Twitter Application credentials. If you do not have those credentials please visit the page
Create your Twitter application.
In your solution explorer open the App.Config of Examplinvi.
By default we provide the TweetinviApi application consumer credentials so that you can test directly.
Whilst the Consumer credentials are required to identify your application, the Access Token are not required and can even be requested by Tweetinvi thanks to the
As a consequence populate the information of the
token_ConsumerKey and the
token_ConsumerSecret value fields by using your application consumer credentials.
Get a Token
Now to use your application, you will a user to login on Twitter REST API. To do so, you need the
token_AccessToken and the
token_AccessTokenSecret credentials of this user associated with your application.
You can get test credentials on the application page of Twitter. Otherwise you can create a Token by using the
In the Examplinvi project, the Main method contains this code snippet :
// Initializing a Token with Twitter Credentials contained in the App.config
token = new
// Generate a Token with Access Token for the User
var t =
if (t !=
token = t;
By using GenerateToken, the application will print your Token information.
You now have access to all the information you might need to access Twitter web services.
You might want to store this information so you can use them later on.
Please notice that by default, the token created from the App.config is overridden by the new generated
We have seen that there is multiple ways to setup your
Token. As I said, for test purposes set the
Token information from the App.config. To allow new users using your application use the
TokenCreator and generate a
Token for your application.