I have a problem with getting folder info by it's shared link / ID.
I have two users - the system user who calls the Dropbox API (ex. user A) and a regular user (ex. user B). I have a folder created by user B, user A is added to the members of this folder as owner. I have a link to this folder created by user B.
From user A through the Dropbox API calls I want to receive metadata of this folder, incl. its path, to be able to work with this folder (add / remove files, links, users, etc.).
To achieve this I:
Get folder link metadata (incl. folder ID like "id:a4ayc_80_OEAAAAAAAAAXz") using sharing/get_shared_link_metadata.
Get folder metadata using files/get_metadata with recieved folder ID as "path" parameter but in response I get the error "path/not_found/".
Why can't my system user A get information on the folder having its ID and being its member (owner)?
Related
I have an application hosted with AWS CloudFront, which uses Lambda and Cognito for authentication. We have a concept called "user group", in which there are two types of users: type A which has full access to the application, and type B which has restricted access. Our application has an index.html file, which imports an index.js file, which loads a catalog of items that should be visible to group A, while hidden to group B. My task therefore boils down to differentiating user group A from user group B in the JS file.
A seemingly straightforward solution is to store the group that the viewer user belongs to in the cookie. However, this seems problematic since users can simply modify the cookies and get access to resources that they should not have access to. I wonder what the best way of handling this is? Thanks in advance!
Is there any way to overwrite permission to share drive item to specific users only?
e.g.
Case 1:
File1 is shared with User1. I want to share File1 to User2 only using graph api which can also remove User1 from share list.
Currently, Graph APIs are available to add the permission and to delete permission separately.
But, I need to deal with a lot of files to update the permissions and for each file I need to take difference of permissions (User list already shared and User list needs to be updated to share item) for drive item to delete the permission to remove User from share list.
Case 2:
Another case is to make File private to the user. Is there any way to make file private directly(possibly single api call)?. Currently, I have to delete each user permission from shared list(5 calls to delete permissions if file is shared with 5 users). Again, I am dealing with a lot of files.
[Edited]
More info: My use case is for Direct Access permission and Not link-based permission.
According to your scenario, I think you can create a sharelink for a file by using the following API: /sites/{siteId}/drive/items/{itemId}/createLink and grant access to sharelink accordingly.
Refer to the documentation here on accessing shared drive items.
If this doesn't help, consider raising user voice for your specific scenario so that it goes into our backlog.
I'm using the Google Drive API to get data about a drive file with its fileID in order to tell if I can edit the file with the account that I set the credentials on the API.
However, I don't know which parameter should I use for this, the documentation for the API states that:
capabilities.canEdit: (boolean) Whether the current user can edit this file.
capabilities.canModifyContent: (boolean) Whether the current user can modify the content of this file
Are editing and modifying content the very same thing?
I've build a simple application to be able to create folder tokens using the Marketo REST API:
Marketo REST APIs: Get Tokens by Folder Id
From the Marketo Portal, I can see that inside a folder, tokens are grouped by type :
Local: tokens created inside the folder
Inherited: tokens that have been created in a parent folder.
Overridden: tokens that have been created in a parent folder but that the value has been overridden in the folder.
I would like to be able to group tokens in my application doing the same.
From Marketo documentation, I can't see any token type inside the Json result.
The only workaround I've found is to query both the folder and it parent folder so that I will be able to compare tokens and determine their types:
If the token doesn't exist in the parent folder, this is a local token.
If the token exists in the parent folder and has the same value, this is an inherited token.
If the token exists in the parent folder and has a different value, this is an overridden token.
I would like to know if there is any way to get the token type from the Json response without to query both folder and parent folder ?
Thanks in advance ^^
The token state can't be read from the response, so your best bet would be to to infer it in the manner you described.
Is there a way to list the google drive file name, and permission level in the same call?
I have been playing around with the Drive Api recently trying to do the following.
I am trying to take a folder id and then get the permissions on that folder id. Then list out the child objects in that folder.
I have been able to do that using the permission endpoint.
The problem I am seeing is when I list the children files in a folder, I only get the ids back. From there I run a loop over all those ids and then get my permission values back. But at that point there is no ID or File name in the result.
I used the Drive V2 permissions list endpoint
https://developers.google.com/drive/v2/reference/permissions/list
Here is an example of the json output.
https://gist.github.com/daguy666/c90cd9e94ca3845b5aab
Things I would love to get out of this one call.
User info (email / username)
Permission level
File name or File ID