Struct slack_chat_api::oauth::Oauth
source · pub struct Oauth {
pub client: Client,
}Fields§
§client: ClientImplementations§
source§impl Oauth
impl Oauth
sourcepub async fn access(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool
) -> Result<DndEndSchema>
pub async fn access( &self, client_id: &str, client_secret: &str, code: &str, redirect_uri: &str, single_channel: bool ) -> Result<DndEndSchema>
This function performs a GET to the /oauth.access endpoint.
Exchanges a temporary OAuth verifier code for an access token.
FROM: https://api.slack.com/methods/oauth.access
Parameters:
client_id: &str– Issued when you created your application.client_secret: &str– Issued when you created your application.code: &str– Thecodeparam returned via the OAuth callback.redirect_uri: &str– This must match the originally submitted URI (if one was sent).single_channel: bool– Request the user to add your app only to a single channel. Only valid with a legacy workspace app.
sourcepub async fn token(
&self,
client_id: &str,
client_secret: &str,
code: &str,
redirect_uri: &str,
single_channel: bool
) -> Result<DndEndSchema>
pub async fn token( &self, client_id: &str, client_secret: &str, code: &str, redirect_uri: &str, single_channel: bool ) -> Result<DndEndSchema>
This function performs a GET to the /oauth.token endpoint.
Exchanges a temporary OAuth verifier code for a workspace token.
FROM: https://api.slack.com/methods/oauth.token
Parameters:
client_id: &str– Issued when you created your application.client_secret: &str– Issued when you created your application.code: &str– Thecodeparam returned via the OAuth callback.redirect_uri: &str– This must match the originally submitted URI (if one was sent).single_channel: bool– Request the user to add your app only to a single channel.