lib/ringcentral_sdk/rest/client.rb in ringcentral_sdk-2.3.0 vs lib/ringcentral_sdk/rest/client.rb in ringcentral_sdk-3.0.0
- old
+ new
@@ -156,12 +156,12 @@
@config.logger.info("SET_TOKEN: #{token_string}")
end
def new_oauth2_client
OAuth2::Client.new(
- @config.app_key,
- @config.app_secret,
+ @config.client_id,
+ @config.client_secret,
site: @config.server_url,
authorize_url: @config.authorize_url,
token_url: TOKEN_ENDPOINT
)
end
@@ -175,10 +175,10 @@
raise ArgumentError, 'client is not an OAuth2::Client'
end
end
def api_key
- Base64.encode64("#{@config.app_key}:#{@config.app_secret}").gsub(/\s/, '')
+ Base64.encode64("#{@config.client_id}:#{@config.client_secret}").gsub(/\s/, '')
end
def send_request(request_sdk = {})
if request_sdk.is_a? Hash
request_sdk = RingCentralSdk::REST::Request::Simple.new request_sdk