Skip to content

feat: add oauth.v2.user.access method - #1712

Draft
zimeg wants to merge 1 commit into
mainfrom
zimeg-feat-oauth-v2-user-access
Draft

zimeg wants to merge 1 commit into
mainfrom
zimeg-feat-oauth-v2-user-access

Conversation

@zimeg

@zimeg zimeg commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds the oauth.v2.user.access method to the sync and async clients.

  • oauthV2UserAccess takes clientId, clientSecret, code, codeVerifier, redirectUri, grantType, refreshToken, and assertion.
  • With a clientSecret, the client credentials are sent with HTTP Basic authentication, as the docs recommend and as oauthV2Access does. Without one, such as a PKCE client that sends codeVerifier, client_id is sent as a form parameter.
  • The response has the documented access_token, token_type, id_token, authed_user (id, scope), and team (id). OAuthTest parses the example response from the docs.
  • The docs list special rate limits, the same as oauth.v2.access, so it's Tier 4 like oauthV2Access.

This is part 1 of 1 in the oauth stack, which is based on main. This pull request is in batch B6 oauth tokens.

  1. feat: add oauth.v2.user.access method #1712 oauth.v2.user.access 👈 this pull request

Testing

Run the remote tests for this layer:

  • test_with_remote_apis.methods.oauth_Test#userAccess

Both requests, one with a client secret and one with only client_id and code_verifier, return the documented invalid_code for an empty code. That's the same check accessV2 makes for oauth.v2.access, since a full exchange needs a real OAuth callback.

Category

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.83%. Comparing base (8fa0566) to head (346af53).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../com/slack/api/methods/impl/MethodsClientImpl.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1712      +/-   ##
============================================
- Coverage     73.95%   73.83%   -0.12%     
+ Complexity     4752     4751       -1     
============================================
  Files           487      488       +1     
  Lines         14811    14831      +20     
  Branches       1536     1538       +2     
============================================
- Hits          10953    10950       -3     
- Misses         2943     2963      +20     
- Partials        915      918       +3     
Flag Coverage Δ
jdk-14 73.83% <95.00%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg changed the base branch from zimeg-feat-oauth-v2-complete-short-token-rotation to main November 18, 2026 06:37
@zimeg
zimeg force-pushed the zimeg-feat-oauth-v2-user-access branch from a1aaf2b to 346af53 Compare November 18, 2026 06:37

This branch has not been deployed

No deployments
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 project:slack-api-client project:slack-api-client semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant