Here are the ways you can use
slackteams to manage your slack teams.
To create a new token in an interactive session:
This will generate a minimal slack api token for you to interact with the slack. For more information on the different permissions the token can take refer to the Managing Tokens Vignette
The token team will be created, loaded and activated for you, so you can start working right away. To store this token for future sessions refer to Storing A Token.
If an environment variable SLACK_API_TOKEN is defined (eg .Renviron) then when the package is loaded or the namespace is attached
slackteams will load and activate that team and determine the team name associated with the api token.
The primary method that
slackteams loads and activates teams into the session is via a local JSON file. The assumed default location of the JSON file is
The contents of this file can contain multiple teams which you can activate during a session. Each field in the JSON contains the team name and the api token associated with it:
The teams are loaded using
Once the teams are loaded then a team can be activated using
If you have a JSON file already created and want to add a team api token you can use
slackteams::add_team to manually update the slackteams environment with the new team.
slackteams::add_team(team = MY_NEW_TEAM, token = token)
If you want to store this information in your JSON file you can use, which will either update (teams that exists) or append (new teams) to the local JSON.
slackteams::slackteams(file = PATH_TO_JSON)