Problem
Hi guys. when I try to send this request I don't know why it doesn't work, I have Oauth2.0 I happen to use Nuxt2 and Nuxt/auth to make a static page. That's why axios sends this request but the response is the json down here.
google scopes https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/drive https://www.googleapis .com/auth/drive.file https://www.googleapis.com/auth/spreadsheets
The copy page exists and the paste page exists.
Request body
{
"destinationSpreadsheetId": "2068676742"
}
RESPONSE
{
"error": {
"code": 400,
"message": "Invalid destinationSpreadsheetId [2068676742]",
"status": "INVALID_ARGUMENT"
}
}
thank you
From "destinationSpreadsheetId": "2068676742"
of your request body and "message": "Invalid destinationSpreadsheetId [2068676742]"
of your error message, I guessed that the value of 2068676742
might not be the destination Spreadsheet ID.
If you actually used 2068676742
as the value of the destination Spreadsheet ID, I guess that from the length of the value, you might have used the sheet ID.
If my understanding is correct, please use the Spreadsheet ID of the destination Spreadsheet, and test it again.
spreadsheetId
of https://docs.google.com/spreadsheets/d/spreadsheetId/edit#gid=0
.sheetId
of https://docs.google.com/spreadsheets/d/aBC-123_xYz/edit#gid=sheetId
.Method: spreadsheets.sheets.copyTo
destinationSpreadsheetId
: string, The ID of the spreadsheet to copy the sheet to.