Skip to content

feat: add --no-auth flag to api command for unauthenticated requests#566

Open
WilliamBergamin wants to merge 1 commit into
mainfrom
no-auth-for-api-command
Open

feat: add --no-auth flag to api command for unauthenticated requests#566
WilliamBergamin wants to merge 1 commit into
mainfrom
no-auth-for-api-command

Conversation

@WilliamBergamin
Copy link
Copy Markdown
Contributor

Changelog

Add --no-auth flag to the api command, allowing users to call Slack API methods that don't require authentication.

Summary

Some Slack API methods don't require authentication. Previously, the api command always resolved a token, failing if none was available, even when calling methods that don't need one. This prevents users from using publicly accessible endpoints.

This PR adds a --no-auth flag that skips token resolution entirely and sends the request without a token.

Preview

Screenshot 2026-05-29 at 1 30 50 PM

Testing

slack api blocks.validate --no-auth blocks='[{"type":"section","text":{"type":"mrkdwn","text":"Hello"}}]'
slack api api.test --no-auth

Notes

None

Requirements

@WilliamBergamin WilliamBergamin added this to the Next Release milestone May 29, 2026
@WilliamBergamin WilliamBergamin self-assigned this May 29, 2026
@WilliamBergamin WilliamBergamin requested a review from a team as a code owner May 29, 2026 17:40
@WilliamBergamin WilliamBergamin added enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment labels May 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.72%. Comparing base (c693443) to head (ac3ebc5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/api/api.go 89.47% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #566      +/-   ##
==========================================
+ Coverage   71.66%   71.72%   +0.06%     
==========================================
  Files         226      226              
  Lines       19115    19128      +13     
==========================================
+ Hits        13699    13720      +21     
+ Misses       4209     4205       -4     
+ Partials     1207     1203       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant