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.

Discuss Dropbox Developer & API

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

Fail updating folder member

Fail updating folder member

mikechiu
Explorer | Level 4

Hi, I am running into a problem when calling sharing/update_folder_member .

 

The error is 

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

 

Below are my steps

1. List folder's member

Screenshot 2024-07-22 at 16.10.54.png

2. Update member's access to viewer with curl

 

I also tested with Dropbox-API-Select-User again but still not working.

I was wondering if there's any setting I need to do ?

Thanks.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The /2/sharing/update_folder_member endpoint does support the Dropbox-API-Select-Admin header, but only in the "Team Admin" mode, meaning it can "access content of team folders and team spaces but not the team members' home namespaces". So, for example, if that namespace is for a shared folder in the account's home namespace, you can't use the Dropbox-API-Select-Admin header and would need to instead use the Dropbox-API-Select-User header.

 

As for the version of the call where you do use the Dropbox-API-Select-User header, as Здравко noted, it looks like that did succeed, but returned a confusing warning message. For reference, if you print out the status code, I expect it is a 200, indicating success. I'll ask the team to look into this to correct that confusing warning message though.

View solution in original post

8 Replies 8

Здравко
Legendary | Level 20

@mikechiu wrote:

...

I was wondering if there's any setting I need to do ?

...


Hi @mikechiu,

At the beginning, post how exactly you launched the failing request to sharing/update_folder_member. By now you listed the members (using /2/sharing/list_folder_members) and it works as far as can be seen. Also, check if by any chance you have used/selected to update member that's not listed and make sure you (the one that makes changes) are member of that folder with permission to do so (either owner or editor - something required).

Good luck.

Greg-DB
Dropbox Staff

@mikechiu If you're still having trouble with /2/sharing/update_folder_member, as Здравко said, please share the details of the /2/sharing/update_folder_member call so we can take a look.

mikechiu
Explorer | Level 4

Thanks @Здравко and @Greg-DB .

 

Sorry it's my bad, I forgot to upload the request I made.

Below is the requests I've made:

Screenshot 2024-07-23 at 10.10.24.png

As you can see, I use the owner as Dropbox-API-Select-Admin and Dropbox-API-Select-User, and used the member selector from email to dropbox-id, all requests failed.

 

Please help check if anything wrong or wrong parameters I put in the request. thanks.

Здравко
Legendary | Level 20

@mikechiu, Your last call succeeds actually. 😉

There is some kind of warning. To be honest I don't know why this is. Greg will tell us what's warned.

Just ignore the warning and congratulations - you succeeded.

 

PS: For sure there is some bug in this API endpoint. I believe will be fixed once already known.

mikechiu
Explorer | Level 4

@Здравко oh, yes, I think you're right, the response of the list folder members showing that the access type is viewer now. And yes the message is pretty confusing tho. 😂

 

And I was wondering why the previous 3 requests failed ? As the document mentioned this API accepts Dropbox-API-Select-Admin header and actually I'd prefer to using this header.

Still need more information on it. 

Greg-DB
Dropbox Staff
Go to solution

The /2/sharing/update_folder_member endpoint does support the Dropbox-API-Select-Admin header, but only in the "Team Admin" mode, meaning it can "access content of team folders and team spaces but not the team members' home namespaces". So, for example, if that namespace is for a shared folder in the account's home namespace, you can't use the Dropbox-API-Select-Admin header and would need to instead use the Dropbox-API-Select-User header.

 

As for the version of the call where you do use the Dropbox-API-Select-User header, as Здравко noted, it looks like that did succeed, but returned a confusing warning message. For reference, if you print out the status code, I expect it is a 200, indicating success. I'll ask the team to look into this to correct that confusing warning message though.

JohnnyDogman
Helpful | Level 7
Go to solution

It sounds like the issue is related to the member not being recognized. Here’s how to troubleshoot:

  1. Verify Membership:

    • Make sure the person you’re trying to update is indeed a member of the folder. Double-check the list of members.
  2. Check Permissions:

    • Ensure you have the necessary permissions to update members.
  3. Correct User ID:

    • Verify that you’re using the correct user ID with the Dropbox-API-Select-User header.
  4. Use Correct API Endpoint:

    • Ensure you’re calling the correct API endpoint and using the right parameters.

mikechiu
Explorer | Level 4
Go to solution

Hi @Greg-DB ,


For reference, if you print out the status code, I expect it is a 200, indicating success. 

yes, the API status code is 200 with warning.

 

I'll ask the team to look into this to correct that confusing warning message though.

That's great, thanks.

And thanks for the team-admin explanation, that solves my question.

 

@JohnnyDogman , yes, I've checked the member I changed and the member I used as the Select-API-User header are all the member of the team. Thanks for the step of troubleshooting.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    mikechiu Explorer | Level 4
  • User avatar
    JohnnyDogman Helpful | Level 7
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?