I copy pasted from the google api and in my code I verify the user using a token and then right after that I do this code
text1="text"
text2="bruh"
text3="reee"
requests = [
{
'insertText': {
'location': {
'index': 25,
},
'text': text1
}
},
{
'insertText': {
'location': {
'index': 50,
},
'text': text2
}
},
{
'insertText': {
'location': {
'index': 75,
},
'text': text3
}
},
]
result = service.documents().batchUpdate(
documentId=DOCUMENT_ID, body={'requests': requests}).execute()
but I keep getting an error code that says
"Invalid requests[0].insertText: Index 25 must be less than the end index of the referenced segment, 2.