Skip to content

Setting up Twot

Robert MacLean edited this page May 19, 2020 · 2 revisions

Requirements

You will need to register a Twitter App to get the four keys you will need to use the tool.

Set API Keys

There are two ways the API keys can be configured to be used by Twot, either using the .NET user secret store or in a secrets.json file.

secrets.json

Creating a secrets.json file is the easiest. Just place the file in the same directory as the executable and replace the ??? below with your keys you got from the Twitter API.

{
    "twot:apikey": "???",
    "twot:apisecret": "???",
    "twot:accesstoken": "???",
    "twot:accesssecret": "???"
}

Using .NET User Secrets

Using .NET secrets let you set them once per machine so may be useful for some use cases. First, follow this guide to enable the user secret storage.

Once the user secret story is ready, run the following commands, changing the ??? to the values from Twitter, to set keys.

  • dotnet user-secrets set "twot:apikey" "???"
  • dotnet user-secrets set "twot:apisecret" "???"
  • dotnet user-secrets set "twot:accesstoken" "???"
  • dotnet user-secrets set "twot:accesssecret" "???"

Useful commands

Init is a very useful command as it will assist you in creating the files needed to get started with setting up Twot.

Once you are done getting setup, you can run Ready which will tell you if everything is correctly configured.