module Slack::Web::Api::Endpoints::OauthV2

Public Instance Methods

oauth_v2_access(options = {}) click to toggle source

Exchanges a temporary OAuth verifier code for an access token.

@option options [Object] :code

The code param returned via the OAuth callback.

@option options [Object] :client_id

Issued when you created your application.

@option options [Object] :client_secret

Issued when you created your application.

@option options [Object] :redirect_uri

This must match the originally submitted URI (if one was sent).

@see api.slack.com/methods/oauth.v2.access @see github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth.v2/oauth.v2.access.json

# File lib/slack/web/api/endpoints/oauth_v2.rb, line 22
def oauth_v2_access(options = {})
  throw ArgumentError.new('Required arguments :code missing') if options[:code].nil?
  post('oauth.v2.access', options)
end