Android Question Problem Updating Google Sheets

dank

Member
Licensed User
Longtime User
Now to my next related question concerning Oauth2 and Google Sheets API. I'm having trouble updating my Google sheet. I can read from it without any problems.

The relevant code and error:

B4X:
j.PutString("https://sheets.googleapis.com/v4/spreadsheets/*************/values/sheet1!a3:e7?valueInputOption=RAW",s)
      
j.GetRequest.SetHeader("Authorization","Bearer " & Token)
j.GetRequest.SetHeader("Accept","application/json")
j.GetRequest.SetContentType("application/json")

where s= {"majorDimension":"ROWS","values": [ ["card1","","","there","yes "], ["Card2","","","","yes "] ] }


ResponseError. Reason: , Response: {
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND"
  }
}

I have tried using PutString and PostString. I've tested "s" with Google WorkSpace, and it works there without a problem.

I'm sure there is something simple I'm missing, but I can't see it.

Any advice? As always, thanks in advance!
 
Top