"Access denied - insufficient permission" While updating the Google file name
Hi,
I am getting "access_denied_insufficient_permissions" while updating the google file name through API in the below scenario:
Use Case: I created a Google Document.
Success Scenario: If my file is not opened with Google docs then I am able to rename the file through API.
Failure Scenario: If my file is opened with Google docs then I am getting error "access_denied_insufficient_permissions"
Can you please do let me know how to update the file name even if the file is opened with Google Docs?
-
Hi Kourtney,
Thanks for your reply. I just reproduced this issue. Below are the details:
Client Id: okm0351euo9wa7loptcbkivyjnrhrah2
And below are the logs:
"PUT https://api.box.com/2.0/files/796609489261" 403 217
{'Date': 'Tue, 13 Apr 2021 18:00:57 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'Content-Encoding': 'gzip', 'BOX-REQUEST-ID': '0a16821ba5757fd836cee3a7775effe3e'}
{'code': '---ions',
'help_url': 'http://developers.box.com/docs/#errors',
'message': 'Access denied - insufficient permission',
'request_id': 'gxdgfcgpinp0ptx0',
'status': 403,
'type': 'error'}
boxsdk.exception.BoxAPIException: Message: Access denied - insufficient permission
Status: 403
Code: access_denied_insufficient_permissions
Request ID: gxdgfcgpinp0ptx0
Headers: {'Date': 'Tue, 13 Apr 2021 18:00:57 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Strict-Transport-Security': 'max-age=31536000', 'Cache-Control': 'no-cache, no-store', 'Content-Encoding': 'gzip', 'BOX-REQUEST-ID': '0a16821ba5757fd836cee3a7775effe3e'}
URL: https://api.box.com/2.0/files/796609489261
Method: PUT
Context Info: NoneBelow are the steps I executed to reproduce this issue:
1. Navigated to file location in Box web application and opened it with Google Sheets by signing in to Google account.
2. File got opened in a new tab and I started editing it.
3. And now from the script, I made an API request to update the file name.
4. Above are the logs of that API Failure.
Below is the success scenario of the same file:
1. Now, I stopped editing the same file and closed it.
2. After 5 minutes from the same script I made an API request to update the file name.
3. And the file got renamed successfully.
Please help me out as soon as possible. As it is a blocker for my client and I just stuck here.
Attaching some screenshots for your reference. Let me know if anything else is required from my end. Thanks
Please sign in to leave a comment.
Comments
3 comments