Module: Slack::Web::Api::Endpoints::Oauth
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/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.
-
#oauth_token(options = {}) ⇒ Object
This feature was exclusive to our workspace apps developer preview.
Instance Method Details
#oauth_access(options = {}) ⇒ Object
This method allows you to exchange a temporary OAuth code for an API access token.
23 24 25 26 27 28 |
# File 'lib/slack/web/api/endpoints/oauth.rb', line 23 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
This feature was exclusive to our workspace apps developer preview. The preview has now ended, but fan-favorite features such as token rotation and the Conversations API will become available to classic Slack apps over the coming months.
45 46 47 48 49 50 |
# File 'lib/slack/web/api/endpoints/oauth.rb', line 45 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 |