talat_india
talat_india

Reputation: 1

Google Drive apis > revisions > publishedLink <undefined> for a document

Google Drive apis > revisions provides documentation for publishing Google Docs. when we access revision resources, we can get revision ids, exportLinks etc as mentioned in documentation.

There is one property 'publishedLink' mentioned in documentation which we can update and access. I tried it. In the request response, I get publishedLink for a spreadsheet, but I get publishedLink: undefined for a google docs document. What should be the reason?

Upvotes: 0

Views: 245

Answers (1)

user2926200
user2926200

Reputation: 117

For Google docs it doesn't seem to populate the publishedlink string but you can easily build it yourself. As I use PHP heres what I use:

print "https://docs.google.com/document/d/".$fileId."/pub";

$fileId is the id of the published file.

An example link would look like this https://docs.google.com/document/d/1oKGvOIPjjGLRN1kYYVvNTgV_VDKt8NKcLFJuGiO-sDI/pub

Upvotes: 1

Related Questions