Token Parameter (Connect-Slack Cmdlet)
The non-expiring token associated with your OAuth application.
Syntax
Connect-Slack -Token string
Data Type
cstr
Default Value
""
Remarks
When you install an OAuth application to a workspace, as described in Creating a Custom OAuth Application, Slack generates a non-expiring OAuth token associated with the application. After installing the application, you can find the token value in your application's settings under Features > OAuth & Permissions > OAuth Tokens > User OAuth Token
You can authenticate to Slack using such tokens by setting the AuthScheme connection property to Token and setting this connection property to the value of the token.
This connection property supports the following token types:
- bot
- workflow
- user
- configuration
- app-level
- service
Note: This connection property does not support tokens that have enabled token rotation, which allows tokens to expire and be refreshed. If you want the added security of enabling token rotation, use the "OAuth" authentication method, as documented in Establishing a Connection.