Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 使用google电子表格api进行身份验证_Ruby On Rails_Ruby_Google Sheets_Google Spreadsheet Api - Fatal编程技术网

Ruby on rails 使用google电子表格api进行身份验证

Ruby on rails 使用google电子表格api进行身份验证,ruby-on-rails,ruby,google-sheets,google-spreadsheet-api,Ruby On Rails,Ruby,Google Sheets,Google Spreadsheet Api,我将遵循上述教程中的“使用谷歌电子表格API进行身份验证”部分 rb(main):008:0> require 'net/https' => true irb(main):009:0> http = Net::HTTP.new('www.google.com', 443) => #<Net::HTTP www.google.com:443 open=false> irb(main):010:0> http.use_ssl

我将遵循上述教程中的“使用谷歌电子表格API进行身份验证”部分

 rb(main):008:0> require 'net/https'
    => true
    irb(main):009:0> http = Net::HTTP.new('www.google.com', 443)
    => #<Net::HTTP www.google.com:443 open=false>
    irb(main):010:0> http.use_ssl = true
    => true
    irb(main):011:0> path = '/accounts/ClientLogin'
    => "/accounts/ClientLogin"

    # Now we are passing in our actual authentication data. 
    # Please visit OAuth For Installed Apps for more information 
    # about the accountType parameter
    irb(main):014:0> data = \
    irb(main):015:0* 'accountType=HOSTED_OR_GOOGLE&Email=your email' \
    irb(main):016:0* '&Passwd=your password' \
    irb(main):017:0* '&service=wise'

    irb(main):018:0> headers = \
    irb(main):019:0* { 'Content-Type' => 'application/x-www-form-urlencoded'}
    => {"Content-Type"=>"

application/x-www-form-urlencoded"}

    # Post the request and print out the response to retrieve our authentication token
    irb(main):020:0> resp, data = http.post(path, data, headers)
=> #<Net::HTTPLengthRequired 411 Length Required readbody=true>
rb(main):008:0>需要“net/https”
=>正确
irb(main):009:0>http=Net::http.new('www.google.com',443)
=> #
irb(main):010:0>http.use\u ssl=true
=>正确
irb(主):011:0>path='/accounts/ClientLogin'
=>“/accounts/ClientLogin”
#现在我们正在传递实际的身份验证数据。
#有关更多信息,请访问OAuth以获取已安装的应用程序
#关于accountType参数
irb(主):014:0>数据=\
irb(main):015:0*“accountType=HOSTED\u或谷歌&Email=your Email”\
irb(主):016:0*“&Passwd=您的密码”\
irb(主):017:0*“&service=wise”
irb(主):018:0>标题=\
irb(main):019:0*{'Content-Type'=>'application/x-www-form-urlencoded'}
=>{“内容类型”=>“
application/x-www-form-urlencoded“}
#发布请求并打印响应以检索我们的身份验证令牌
irb(main):020:0>resp,data=http.post(路径、数据、标题)
=> #
我应该在发帖后得到“=>[#,”,SID=DQAAIIAADGV7J4F-QVQjnxdDRjpslHKC3M…[剪掉其余的认证字符串]。我把我的gmail id和密码放在电子邮件和密码中。
有什么问题吗?

他们可能今天删除了该服务。当我请求此页面时,我收到404(未找到)。

您阅读了吗?是的,请抓住机会向谷歌投诉。