Anonymous access to Google Docs (publicly shared)

277 views
Skip to first unread message

Alister Scott

unread,
Aug 29, 2009, 12:58:20 AM8/29/09
to ruby-roo
Hi,

I am using the latest roo gem.

When I try to access a publicly shared Google Doc (
http://spreadsheets.google.com/ccc?key=0AtL3mPY2rEqmdEY3XzRqUlZKSmM5Z3EtM21UdFdqb1E&hl=en
) using

@ss = Google.new("0AtL3mPY2rEqmdEY3XzRqUlZKSmM5Z3EtM21UdFdqb1E")

it gives this error:

Net::HTTPServerException: 403 "Forbidden"
C:/Ruby/lib/ruby/1.8/net/http.rb:2097:in `error!'
C:/Ruby/lib/ruby/gems/1.8/gems/GData-0.0.4/lib/gdata/base.rb:40:in
`authenticate'
C:/Ruby/lib/ruby/gems/1.8/gems/roo-1.3.9/lib/roo/google.rb:107:in
`initialize'
tc_main.rb:25:in `new'
tc_main.rb:25:in `setup'

Can you suggest a workaround besides providing username and password
to the new method?

I tried setting the ENV variables but this didn't help.

Cheers,
Alister Scott

Hugh McGowan

unread,
Aug 29, 2009, 12:00:42 PM8/29/09
to ruby...@googlegroups.com
Hi Alister,

I've reproduced what you're seeing and it looks like the code is always trying to authenticate. I'm looking into it and will try to get a fix out in the next few days.

Thanks!
Hugh

Hugh McGowan

unread,
Aug 31, 2009, 10:16:06 PM8/31/09
to ruby-roo
Fixed in 1.3.11 - let me know if you have any issues. You'll need to
mark the doc as Publish as web page using the Share menu.
Unfortunately sharing the doc with Everyone still requires
authentication (still has to be a user to read/write). Publishing it
should work, though note it's read-only.

Thanks!
Hugh

Alister Scott

unread,
Sep 1, 2009, 6:55:56 AM9/1/09
to ruby-roo
Thanks! Installed and tested and all working fine now.
Cheers,
Alister
Reply all
Reply to author
Forward
0 new messages