1

When using the Google Drive Comments API, I can pull in the comments on a specific file, but I'd like to also see the text that the comment is associated with. My understanding is that this is the anchor field in the response

According to the anchor docs (very light on documentation), the anchor should include a revision ID, plus a beginning and end to the anchor text, and look like this

      'r': revisionId,
      'a': [
      {
        'line':
        {
          'n': 12,
          'l': 3,
        }
      },
      {
        'line':
        {
          'n': 18,
          'l': 1,
        }
      }]
    }

However, when I pull the comments in, my anchor looks like this

{
   ...
   "anchor": "kix.fkuox8etb960",
   ...
}

Does anyone know how to use this interesting looking ID to get to the structure shown in the documents? Thanks

  • If you can get the text which im not sure you can i would think you would have to go though Google Docs api as its the only thing that has the power to actually read the text from the document. – Linda Lawton - DaImTo Nov 04 '20 at 12:49

1 Answers1

0

Basically, if I understand you correctly, you are looking for a way to retrieve the location data of a comment anchor in a document. Unfortunately, from going through the Google Drive Comments API and checking out this SO answer, it seems there is no support for this at the moment. I also checked out the issue trackers that were posted in the SO answer I referred to, and there doesn't seem to be an advancement there, expect many other people "+1ing" for it.

bentz123
  • 1,081
  • 7
  • 16