Skip to content

Commit 9aa04bc

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

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
@@ -5384,6 +5384,29 @@ def oauth_v2_beginShortTokenRotation(
53845384
kwargs.update({"client_id": client_id, "client_secret": client_secret, "token": token})
53855385
return self.api_call("oauth.v2.beginShortTokenRotation", params=kwargs)
53865386

5387+
def oauth_v2_completeShortTokenRotation(
5388+
self,
5389+
*,
5390+
client_id: str,
5391+
client_secret: str,
5392+
token: str,
5393+
new_token: str,
5394+
**kwargs,
5395+
) -> SlackResponse:
5396+
"""Finishes rotating the secret on an API token with a short secret.
5397+
5398+
https://docs.slack.dev/reference/methods/oauth.v2.completeShortTokenRotation
5399+
5400+
Args:
5401+
client_id: Issued when you created your application. Must be the app the token being rotated was issued to.
5402+
client_secret: Issued when you created your application.
5403+
token: The original short xoxp token being rotated (the one passed to oauth.v2.beginShortTokenRotation).
5404+
Authenticates the request.
5405+
new_token: The new xoxp token returned by oauth.v2.beginShortTokenRotation.
5406+
"""
5407+
kwargs.update({"client_id": client_id, "client_secret": client_secret, "token": token, "new_token": new_token})
5408+
return self.api_call("oauth.v2.completeShortTokenRotation", params=kwargs)
5409+
53875410
def oauth_v2_exchange(
53885411
self,
53895412
*,

‎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)