cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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:Ā 

Sample response for 2/sharing/get_file_metadata user do not have download permission

Sample response for 2/sharing/get_file_metadata user do not have download permission

solitarychild
Explorer | Level 3

Can I have a sample response of 2/sharing/get_file_metadata

where the user does not have the "permissions" to download the file?

Thank you.

1 Reply 1

Greg-DB
Dropbox Staff

I'm not sure I understand exactly which scenario you're referring to. Can you elaborate? In any case though, all of the errors that can be returned are listed in the documentation:

 

https://www.dropbox.com/developers/documentation/http/documentation#sharing-get_file_metadata

 

The actual response response would be structured JSON, e.g.:

 

{
  "error_summary": "access_error/invalid_file/...",
  "error": {
    ".tag": "access_error",
    "access_error": {
      ".tag": "invalid_file"
    }
  }
}

Or, if you're interested in a successful result with a "false" permission returned, it would look like:

 

{
  "access_type": {
    ".tag": "viewer"
  },
  "id": "id:Hcd4PILNenwAAAAAAAAACw",
  "name": "hello.txt",
  "owner_team": {
    "id": "dbtid:AAALfOJvW_VA8-yeLzHQ5Pug2GR15Z4t8KI",
    "name": "TEST API Tester Team"
  },
  "permissions": [
    {
      "action": {
        ".tag": "edit_contents"
      },
      "allow": false
    }
  ],
  "policy": {
    "member_policy": {
      ".tag": "anyone"
    },
    "resolved_member_policy": {
      ".tag": "anyone"
    },
    "acl_update_policy": {
      ".tag": "editors"
    },
    "shared_link_policy": {
      ".tag": "anyone"
    },
    "viewer_info_policy": {
      ".tag": "enabled"
    }
  },
  "preview_url": "https://www.dropbox.com/scl/fi/vmn6wlojv52rnm51tmb9a/hello.txt?dl=0",
  "time_invited": "2017-03-27T18:31:52Z"
}

 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?