Module: Slack::Endpoint::Oauth
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/oauth.rb
Instance Method Summary collapse
-
#oauth_access(options = {}) ⇒ Object
Exchanges a temporary OAuth code for an API token.
-
#oauth_token(options = {}) ⇒ Object
Exchanges a temporary OAuth verifier code for a workspace token.
Instance Method Details
#oauth_access(options = {}) ⇒ Object
Exchanges a temporary OAuth code for an API token.
20 21 22 23 24 25 |
# File 'lib/slack/endpoint/oauth.rb', line 20 def oauth_access(={}) throw ArgumentError.new("Required arguments :client_id missing") if [:client_id].nil? throw ArgumentError.new("Required arguments :client_secret missing") if [:client_secret].nil? throw ArgumentError.new("Required arguments :code missing") if [:code].nil? post("oauth.access", ) end |
#oauth_token(options = {}) ⇒ Object
Exchanges a temporary OAuth verifier code for a workspace token.
43 44 45 46 47 48 |
# File 'lib/slack/endpoint/oauth.rb', line 43 def oauth_token(={}) throw ArgumentError.new("Required arguments :client_id missing") if [:client_id].nil? throw ArgumentError.new("Required arguments :client_secret missing") if [:client_secret].nil? throw ArgumentError.new("Required arguments :code missing") if [:code].nil? post("oauth.token", ) end |