Skip to main content
Question

"Access denied - insufficient permission" While updating the Google file name

  • May 22, 2025
  • 3 replies
  • 7 views

Forum|alt.badge.img

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?

 

 

3 replies

Forum|alt.badge.img

Hello Jagdeep, 

Are you able to provide me with the client ID of your application and an example date/time/timezone of the 403? I'd be happy to take a look in our backend logs to get more information about this error for you. 

Best, 

Kourtney, Box Developer Advocate


Forum|alt.badge.img

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: None

Below 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

BOX__ud-xR_LdZDyLHb4VQooYwg.pngBOX__qHjorMdVPFQsuT0VpJj_cw.png


Forum|alt.badge.img

Hi Kourtney,

Any update on this issue?