Module: Slack::Endpoint::Oauth
- Included in:
- Slack::Endpoint
- Defined in:
- lib/slack/endpoint/oauth.rb
Instance Method Summary collapse
-
#oauth_access(options = {}) ⇒ Object
This method allows you to exchange a temporary OAuth code for an API access token.
Instance Method Details
#oauth_access(options = {}) ⇒ Object
This method allows you to exchange a temporary OAuth code for an API access token. This is used as part of the OAuth authentication flow.
21 22 23 24 25 26 27 |
# File 'lib/slack/endpoint/oauth.rb', line 21 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? [:attachments] = [:attachments].to_json if Hash === [:attachments] post("oauth.access", ) end |