Module: Slack::Web::Api::Endpoints::OauthV2

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/oauth_v2.rb

Instance Method Summary collapse

Instance Method Details

#oauth_v2_access(options = {}) ⇒ Object

Exchanges a temporary OAuth verifier code for an access token.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :code (Object)

    The code param returned via the OAuth callback.

  • :client_id (Object)

    Issued when you created your application.

  • :client_secret (Object)

    Issued when you created your application.

  • :redirect_uri (Object)

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

See Also:



22
23
24
25
# 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