Browser sign-in with PKCE

Connect Slack to vidbyte-cli

Set up a PKCE-enabled Slack app, approve user scopes in your browser, and read a limited page of channel history from the CLI.

Configure a Slack app for local PKCE

Create or use a Slack app that supports PKCE for a public desktop client and permits the CLI's localhost callback. Set its client ID as VIDBYTE_SLACK_CLIENT_ID before login.

Set the Slack client ID

bash
export VIDBYTE_SLACK_CLIENT_ID="your-slack-client-id"
  • User scopes only — This flow requests Slack user scopes; it does not install a bot or request bot scopes.

  • Default scopes — Reading channel and private-group history, direct-message history, and basic user and team information.

  • Slack still decides — Workspace membership, channel visibility, app approval, and granted scopes still limit what you can read.

Connect the workspace

Run login from an interactive terminal. The CLI starts a temporary localhost callback, opens Slack's authorization page, and uses PKCE and state validation to complete the sign-in.

  1. Start sign-in

    Opens Slack's authorization page in your browser. Add --name to label this workspace connection.

    Connect Slack

    bash
    vidbyte-cli connections login slack --name team-slack
  2. Approve in your browser

    After Slack verifies the user and workspace, the CLI saves the token in the OS keyring.

  3. Check the connection

    Rechecks the Slack user and workspace behind the connection name.

    Check the connection

    bash
    vidbyte-cli connections status team-slack
Connect without a custom name

Leave out --name when you only connect one workspace.

Default connection name

bash
vidbyte-cli connections login slack
See every saved connection

Lists saved connection names in the current profile.

List connections

bash
vidbyte-cli connections list

Read a limited page of channel history

Use the Slack channel ID, such as C0123456789; arbitrary URLs are not accepted. The default page is 50 messages.

Read recent messages

bash
vidbyte-cli connections read slack channel C0123456789
  • Page size — Set --limit from 1 to 100 to request a smaller or larger first page.

  • What Slack returns — Slack only returns conversations available to the connected user and granted scopes.

Remove the connection

Log out by connection name to revoke the Slack token where possible and remove the local token and metadata.

Disconnect Slack

bash
vidbyte-cli connections logout team-slack

Next steps