I have a problem loading information using the Google Docs API. The challenge is to download the document and then publish it immediately after downloading. The first part I decided was to get the DocsService client, authenticate myself using the client.setUserCredentials(userName, password) method, and then load the contents using client.insert(URL, newDocument) .
At this point, the document appears in the Google folder. My problem is that I cannot figure out how to publish it. I tried to imitate the POST method (which Google creates when I click on the publication), but this did not work. I also tried using this methodology , but I could not figure out how to authenticate myself (using client.setUserCredentials ).
Is there an easy way or best practice for publishing via API?
Joooe source share