cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
If you’ve changed your email address, now's the perfect time to update it on your Dropbox account and we’re here to help! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: route_access_denied

route_access_denied

Ashley B.15
Helpful | Level 7

Hi,

Would someone be able to help with the following error

401 route_access_denied.

 

I've encountered the above a couple of times now and would like some advice on best to handle it?

 

We use refresh tokens to obtain new access tokens, which appears to be working fine (did encounter and issue with tokens previously - tokens being truncated) but this has now been resolved.

 

We cache the tokens and obtain new tokens when they are due to expire.

 

What should we do when we encounter this error?

 

Thanks in advance

15 Replies 15

Здравко
Legendary | Level 20

Hi @Ashley B.15,

You're trying to access some endpoint that's not available or not accessible to you. Check what do you request to in your call and if needed dump your request to see what's there.

Good luck.

Greg-DB
Dropbox Staff

A 'route_access_denied' error should indicate that the call failed because the API route the app is trying to use is not publicly available.

 

If it appears you're receiving this error incorrectly though, please reply with the following so we can look into it:

  • the name and version number of the SDK/library you are using, if any
  • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
  • the full text of any error or unexpected output
  • 5-10 sample 'X-Dropbox-Request-Id' response header values for the error responses

Ashley B.15
Helpful | Level 7
  • the name and version number of the SDK/library you are using, if any
    • OfficialDropboxDotNetSDKv2/6.37.0.0
  • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the occurs when listing folders https://api.dropboxapi.com/2/files/list_folder
      POSTING: "recursive":false,"include_media_info":true,"include_deleted":false,"include_has_explicit_shared_members":true,"include_mounted_folders":false,"limit":1000,"include_non_downloadable_files":true
      I can't share the path itself, as its one of our customers. but occurs on a path 7 folders deep
  • the full text of any error or unexpected output
    Dropbox.Api.Auth.AuthError+RouteAccessDenied Dropbox.Api.AuthException route_access_denied/.
  • 5-10 sample 'X-Dropbox-Request-Id' response header values for the error responses
    • X-Dropbox-Request-Id: 9d4d355c9dbb48be8f4274150b9a1177

Greg-DB
Dropbox Staff

@Ashley B.15 Thanks, that's helpful. The /2/files/list_folder endpoint should certainly be publicly available so we'll look into this and follow up here once we have an update on this.

Ashley B.15
Helpful | Level 7

Thanks @Greg-DB just for ref, this has occurred 2 times in total when query two different paths with the above end pont.

awb
Helpful | Level 7

@Greg-DB do you have any more news on the above? Thanks

Greg-DB
Dropbox Staff

@awb This is still open with engineering, but I don't have an update yet. I'll follow up here once I do.

awb
Helpful | Level 7

@Greg-DB we had this happen again for the following request

{
Cache-Control: no-cache
Content-Security-Policy: sandbox allow-forms allow-scripts
Www-Authenticate: Bearer realm="Dropbox-API"
X-Content-Type-Options: nosniff
Date: Tue, 30 Jul 2024 17:15:40 GMT
Server: envoy
X-Dropbox-Response-Origin: far_remote
X-Dropbox-Request-Id: 23fe2c6396d24c86b7e2bb7a2ef585e7
Content-Length: 86
Content-Type: application/json
} for Method: POST, RequestUri: 'https://api.dropboxapi.com/2/sharing/get_folder_metadata', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
Authorization: Bearer (omitted)
User-Agent: OfficialDropboxDotNetSDKv2/6.37.0.0
Dropbox-Api-Select-User: (omitted)
Content-Type: application/json; charset=utf-8
Content-Length: 33
}. Body: {"shared_folder_id":"(omitted)"}

 

Dropbox.Api.AuthException: route_access_denied/...

Greg-DB
Dropbox Staff

@awb Thanks! I'll share this sample with the team as well.

Need more support?