auth_url: Slack Authorization URL

View source: R/team_management.R

auth_urlR Documentation

Slack Authorization URL

Description

Generate an authorization URL to add a team manually. Useful, for example, for authorizing a team in a Shiny app.

Usage

auth_url(
  scopes = load_scopes(),
  redirect_uri = NULL,
  team_code = NULL,
  state = NULL
)

Arguments

scopes

character, scopes to request.

redirect_uri

character, the uri to which the user should be directed after authorization. If this is NULL (default), the user will be directed to the default redirection set up in the Slack app.

team_code

character, a team code to restrict the user to (in case they have multiple Slack teams authorized in their browser).

state

character, a code to send to your redirect_uri indicating a state. It is recommended to use a non-human-readable format for this string.

Details

An environment variable controls this function:

  • SLACK_CLIENT_ID: character, the client_id of a Slack app. If this is not provided, the function will use the built-in R4DS Slack app.

Value

character, an authorization URL.

Examples

auth_url()
auth_url(redirect_uri = "http://127.0.0.1:4242")
auth_url(redirect_uri = "http://127.0.0.1:4242", team_code = "T6UC1DKJQ")
auth_url(state = "aabbCCddeeFF")

yonicd/slackteams documentation built on March 13, 2023, 6:26 a.m.