gspread icon indicating copy to clipboard operation
gspread copied to clipboard

copy and transferOwnership

Open brossignol opened this issue 1 year ago • 3 comments

The code:

serviceAccount = gspread.service_account(filename='google-credentials.json')
serviceAccount.copy(file_id, title, copy_permissions=True, copy_comments=False)

return the following error with gspread 6.1.4

gspread.exceptions.APIError: APIError: [403]: The transferOwnership parameter must be enabled when the permission role is 'owner'.

But it works with gpsread 5.12.4.

It seems that the copy function has not been adapted to the new way of transferring ownership.

brossignol avatar Feb 25 '25 14:02 brossignol

thanks for the issue :]

did Google change the way this API works?

do we have any links/documentation?

alifeee avatar Feb 27 '25 18:02 alifeee

@alifeee you can check the doc here. https://developers.google.com/drive/api/reference/rest/v3/permissions/create

anhtule88 avatar Mar 18 '25 03:03 anhtule88

thanks :]

it seems we want to add a test or refresh the cassette if we have one. would you like to give this a go ?

otherwise, it may be waiting for a while ...

alifeee avatar Mar 26 '25 00:03 alifeee