It seems the problem is that the Google Docs API doesn't allow access to published docs, only to docs that are shared with the appropriate permissions. So a workaround for accessing a published doc is to copy its contents to a shared doc and then access this doc instead.