def makeAuthAPICall(url = API_BASE)
      request_url = "#{url}/client/#{@client_id}/authenticate?apikey=#{@api_key}"
      begin
        response = RestClient.get(request_url)
        return response
      rescue RestClient::Exception => error
        begin
          response = JSON.parse(error.response)

          unless response
            raise InvalidRequestException, "The Import API returned: #{error.http_code} #{error.message}"
          end

          raise InvalidRequestException,
            "The Import API returned: #{response['code']} #{response['message']}. Reasons: #{response['reasons']}"
        rescue JSON::ParserError, TypeError => json_parse_error
          raise InvalidResponseException,
            "RestClientError: #{error.class}\n Message: #{error.message}\n Response Code: #{error.http_code}\n Full Response: #{error.response}"
        end
      end
    end
def makeAuthAPICall(url = API_BASE)
      request_url = "#{url}/client/#{@client_id}/authenticate?apikey=#{@api_key}"
      begin
        response = RestClient.get(request_url)
        return response
      rescue RestClient::Exception => error
        begin
          response = JSON.parse(error.response)

          unless response
            raise InvalidRequestException, "The Import API returned: #{error.http_code} #{error.message}"
          end

          raise InvalidRequestException,
            "The Import API returned: #{response['code']} #{response['message']}. Reasons: #{response['reasons']}"
        rescue JSON::ParserError, TypeError => json_parse_error
          raise InvalidResponseException,
            "RestClientError: #{error.class}\n Message: #{error.message}\n Response Code: #{error.http_code}\n Full Response: #{error.response}"
        end
      end
    end
Authenticates with the RJMetrics Data Import API