class Hubspot::OAuthHelper

Constants

AUTHORIZE_URL

Public Class Methods

authorize_url(client_id:, redirect_uri:, scope:, optional_scope: []) click to toggle source
# File lib/hubspot/oauth_helper.rb, line 5
def authorize_url(client_id:, redirect_uri:, scope:, optional_scope: [])
  query = URI.encode_www_form(
    client_id: client_id,
    redirect_uri: redirect_uri,
    scope: Array(scope),
    optional_scope: Array(optional_scope)
  )

  "#{AUTHORIZE_URL}?#{query}"
end