Skip to content

Commit 2bf1c9c

Browse files
zimegClaude
andcommitted
feat(methods): add oauth.v2.completeShortTokenRotation method example
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 4ce42ce commit 2bf1c9c

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎methods/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ $ slack run chat_post_message.py # Make the request
7171
### oauth
7272

7373
- **[oauth.v2.beginShortTokenRotation](https://docs.slack.dev/reference/methods/oauth.v2.beginShortTokenRotation)**: Begins rotating the secret on an API token with a short secret. [Implementation](./src/oauth/v2/oauth_v2_begin_short_token_rotation.py).
74+
- **[oauth.v2.completeShortTokenRotation](https://docs.slack.dev/reference/methods/oauth.v2.completeShortTokenRotation)**: Finishes rotating the secret on an API token with a short secret. [Implementation](./src/oauth/v2/oauth_v2_complete_short_token_rotation.py).
7475

7576
### slackbot
7677

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from slack_sdk import WebClient
2+
3+
# Initialize
4+
client = WebClient()
5+
6+
# Call the oauth.v2.completeShortTokenRotation method
7+
response = client.oauth_v2_completeShortTokenRotation(
8+
client_id="4123121235.9872358710",
9+
client_secret="e1b9e11dfcd19c1982d5de12921e17e8c",
10+
token="xoxp-12345-67890-1928471-abcdefg",
11+
new_token="xoxp-12345-67890-1928471-qemwiiwglagjacakvqbvbfkmvbsvsuzn",
12+
)
13+
14+
# Inspect the response
15+
print(response)

0 commit comments

Comments
 (0)