Hi Team,
I’m trying to use spreadsheets REST API (https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/create ) to create and write some data to a spreadsheet. The REST API requires an access token in the headers. How do I get the access token?
curl --request POST \
'[https://sheets.googleapis.com/v4/spreadsheets?key=[YOUR_API_KEY](https://sheets.googleapis.com/v4/spreadsheets?key=[YOUR_API_KEY)]' \
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{}' \
--compressed
Thanks,
Arun