Skip to content

Commit d280116

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

4 files changed

Lines changed: 67 additions & 2 deletions

File tree

‎slack_sdk/web/async_client.py‎

Lines changed: 20 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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5483,6 +5483,26 @@ def oauth_access(
54835483
auth={"client_id": client_id, "client_secret": client_secret},
54845484
)
54855485

5486+
def oauth_v2_beginShortTokenRotation(
5487+
self,
5488+
*,
5489+
client_id: str,
5490+
client_secret: str,
5491+
token: str,
5492+
**kwargs,
5493+
) -> SlackResponse:
5494+
"""Begins rotating the secret on an API token with a short secret.
5495+
5496+
https://docs.slack.dev/reference/methods/oauth.v2.beginShortTokenRotation
5497+
5498+
Args:
5499+
client_id: Issued when you created your application. Must be the app the token being rotated was issued to.
5500+
client_secret: Issued when you created your application.
5501+
token: The xoxp token being rotated.
5502+
"""
5503+
kwargs.update({"client_id": client_id, "client_secret": client_secret, "token": token})
5504+
return self.api_call("oauth.v2.beginShortTokenRotation", params=kwargs)
5505+
54865506
def oauth_v2_exchange(
54875507
self,
54885508
*,

‎slack_sdk/web/legacy_client.py‎

Lines changed: 20 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)