0

I’m working with the Google Docs API to retrieve the contents of a document.

Used documents.get with the correct documentId and retrieved the document body. The JSON response does not include the @date in it.

Is there a way to get @date in the JSON response?

{
  "startIndex": 1,
  "endIndex": 3,
  "paragraph": {
    "elements": [
      {
        "startIndex": 1,
        "endIndex": 3,
        "textRun": {
          "content": "\n",
          "textStyle": {}
        }
      }
    ],
    "paragraphStyle": {
      "namedStyleType": "NORMAL_TEXT",
      "direction": "LEFT_TO_RIGHT"
    }
  }
}

This is the response that I am getting.

I see that I need to use export feature of google drive to get the doc in pdf or txt to get the date.

2
  • 1
    Welcome to Stack Overflow! Kindly share what I see that I need to use export feature of google drive to get the doc in pdf or txt to get the date. means. The REST Resource: documents doesn't have any @date in it so are you perhaps looking for REST Resource: files which has createdTime? Commented Jan 21 at 19:12
  • Sorry for the vagueness. If you export the doc file as pdf the date mentioned in the doc will be visible. @date in google doc lets you insert a datepicker. I don't see that in Json obtained from the document.get api. Commented Jan 22 at 12:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.