From 3f452374aba36f666ab3593bdf8dd7c398777105 Mon Sep 17 00:00:00 2001 From: Oktay Sancak Date: Sat, 19 Aug 2017 19:40:56 +1000 Subject: [PATCH] Add `oauth.token` method --- slacker/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/slacker/__init__.py b/slacker/__init__.py index 68a3879..8da7e5e 100644 --- a/slacker/__init__.py +++ b/slacker/__init__.py @@ -920,6 +920,17 @@ def access(self, client_id, client_secret, code, redirect_uri=None): 'redirect_uri': redirect_uri }) + def token(self, client_id, client_secret, code, redirect_uri=None, + single_channel=None): + return self.post('oauth.token', + data={ + 'client_id': client_id, + 'client_secret': client_secret, + 'code': code, + 'redirect_uri': redirect_uri, + 'single_channel': single_channel, + }) + class AppsPermissions(BaseAPI): def info(self):