Command

nylas slack auth set

Set the Slack API token for workspace integration.

Written by Qasim Muhammad Staff SRE

What does nylas slack auth set do?

The nylas slack auth set command stores a Slack Bot or User OAuth token so the CLI can interact with your Slack workspace. Pass the token via --token or interactively. Once configured, all slack subcommands (messages, users, status) authenticate against this workspace.

Usage

nylas slack auth set --token TOKEN

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations
--tokenSlack Bot or User OAuth token

Examples

The nylas slack auth set command stores a Slack Bot or User OAuth token so the CLI can interact with your Slack workspace.

Set token directly

nylas slack auth set --token xoxb-your-slack-token

Set token then verify

nylas slack auth set --token xoxb-your-slack-token
nylas slack users list --limit 1

Example output

✓ Slack token saved
  Workspace: Acme Inc
  User: Alice Chen

Try: nylas slack channels list

Troubleshooting

Invalid token error

Verify the token at api.slack.com/apps. Bot tokens start with xoxb-, user tokens with xoxp-.

Token not persisting between sessions

Check write permissions for ~/.config/nylas/. Alternatively, set the NYLAS_SLACK_TOKEN environment variable.

Run nylas slack auth set --help for full help output.