Generate authcode with the below API
Generate access token with below API
curl -X POST https://oauth2.googleapis.com/token
-H "Content-Type: application/x-www-form-urlencoded"
-d "code=YOUR_AUTH_CODE"
-d "client_id=YOUR_CLIENT_ID"
-d "client_secret=YOUR_CLIENT_SECRET"
-d "redirect_uri=YOUR_REDIRECT_URI"
-d "grant_type=authorization_code"
You can use generated access token to hit Googlesheet PUT Rest API.