SlackWebAPI v1.2.0 SlackWebAPI.Api.Oauth View Source
API calls for all endpoints tagged Oauth
.
Link to this section Summary
Functions
Exchanges a temporary OAuth verifier code for an access token.
Exchanges a temporary OAuth verifier code for a workspace token.
Link to this section Functions
Link to this function
oauth_access(connection, opts \\ [])
View Sourceoauth_access(Tesla.Env.client(), keyword()) :: {:ok, SlackWebAPI.Model.DefaultSuccessTemplate.t()} | {:error, Tesla.Env.t()}
Exchanges a temporary OAuth verifier code for an access token.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :code (String.t): The
code
param returned via the OAuth callback. - :redirect_uri (String.t): This must match the originally submitted URI (if one was sent).
- :client_id (String.t): Issued when you created your application.
- :client_secret (String.t): Issued when you created your application.
- :single_channel (boolean()): Request the user to add your app only to a single channel.
- :code (String.t): The
Returns
{:ok, %SlackWebAPI.Model.DefaultSuccessTemplate{}} on success {:error, info} on failure
Link to this function
oauth_token(connection, opts \\ [])
View Sourceoauth_token(Tesla.Env.client(), keyword()) :: {:ok, SlackWebAPI.Model.DefaultSuccessTemplate.t()} | {:error, Tesla.Env.t()}
Exchanges a temporary OAuth verifier code for a workspace token.
Parameters
- connection (SlackWebAPI.Connection): Connection to server
opts (KeywordList): [optional] Optional parameters
- :client_secret (String.t): Issued when you created your application.
- :code (String.t): The
code
param returned via the OAuth callback. - :single_channel (boolean()): Request the user to add your app only to a single channel.
- :client_id (String.t): Issued when you created your application.
- :redirect_uri (String.t): This must match the originally submitted URI (if one was sent).
Returns
{:ok, %SlackWebAPI.Model.DefaultSuccessTemplate{}} on success {:error, info} on failure