Skip to content

Commit 2de889d

Browse files
zimegClaude
andcommitted
feat: add oauth.v2.completeShortTokenRotation method
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent d280116 commit 2de889d

4 files changed

Lines changed: 76 additions & 2 deletions

File tree

‎slack_sdk/web/async_client.py‎

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎slack_sdk/web/client.py‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5503,6 +5503,29 @@ def oauth_v2_beginShortTokenRotation(
55035503
kwargs.update({"client_id": client_id, "client_secret": client_secret, "token": token})
55045504
return self.api_call("oauth.v2.beginShortTokenRotation", params=kwargs)
55055505

5506+
def oauth_v2_completeShortTokenRotation(
5507+
self,
5508+
*,
5509+
client_id: str,
5510+
client_secret: str,
5511+
token: str,
5512+
new_token: str,
5513+
**kwargs,
5514+
) -> SlackResponse:
5515+
"""Finishes rotating the secret on an API token with a short secret.
5516+
5517+
https://docs.slack.dev/reference/methods/oauth.v2.completeShortTokenRotation
5518+
5519+
Args:
5520+
client_id: Issued when you created your application. Must be the app the token being rotated was issued to.
5521+
client_secret: Issued when you created your application.
5522+
token: The original short xoxp token being rotated (the one passed to oauth.v2.beginShortTokenRotation).
5523+
Authenticates the request.
5524+
new_token: The new xoxp token returned by oauth.v2.beginShortTokenRotation.
5525+
"""
5526+
kwargs.update({"client_id": client_id, "client_secret": client_secret, "token": token, "new_token": new_token})
5527+
return self.api_call("oauth.v2.completeShortTokenRotation", params=kwargs)
5528+
55065529
def oauth_v2_exchange(
55075530
self,
55085531
*,

‎slack_sdk/web/legacy_client.py‎

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)