cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Learn all about how Alex on the Community team used Dropbox in college here!

Dropbox installs & integrations

Connect your tools and content together with help from the Dropbox Community. Join a discussion or post a question of your own to get started.

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

How to programatically find the signed user of the desktop app

How to programatically find the signed user of the desktop app

vsTheijs
Explorer | Level 4

I would like to programatically find out some information about the installed Dropbox desktop app. This article already explained me how to find the Dropbox root folder from a JSON file: https://help.dropbox.com/installs-integrations/desktop/locate-dropbox-folder

However that JSON file does not specify which user is signed in. It only shows an id called 'host' from which I don't know how to derive the actual user. I would like to have an email address if that is possible.

Does anyone know how to get this information?

 

UPDATE:

I would like to add that I already have a candidate user and I can access all his/her data through the web API. This makes the case a bit simpler as I only want to know if my candidate user is also signed in into the desktop app. If not, I don't care who is signed in.

 

5 Replies 5

Re: How to programatically find the signed user of the desktop app

Daphne
Dropboxer

Hi there @vsTheijs, hope you're doing well today!

Currently we don't have an official way to find out this info programatically. I would only be able to suggest checking the email address through the desktop app preferences.

It's possible that other users may have some suggestions on how to achieve this and I'd encourage anyone who'd like to add their input on this to joining the discussion. 

Let me know if you have any questions, I'd be happy to help where I can.

Thanks!


Daphne
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
:arrows_counterclockwise: Still stuck? Ask me a question!
:pushpin: Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Re: How to programatically find the signed user of the desktop app

vsTheijs
Explorer | Level 4

Hi Daphne,

Thank you for your reply. I'm really looking for an approach that can be done by code, so your suggestion would be pretty difficult.

The best idea I can currently think of is to use the local root folder (as shown in the article I added) and start comparing the local folder/file structure with the online folder structure through the web API.

This is not waterproof or efficient, but I guess it would work in most cases.

If anyone has a cleaner way to find the signed in user, I would love to hear it.

Re: How to programatically find the signed user of the desktop app

Daphne
Dropboxer

Hey @vsTheijs!

Sorry that I couldn't be of much assistance with this.

If you happen to be using a Business subscription, each member would have a personal folder within their Dropbox folder with their name on it. Perhaps the name shown on the personal folder will make it easier to identify the user. 

I hope this helps!

 

EDIT: Perhaps you could try what is mentioned here if it's applicable.


Daphne
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
:arrows_counterclockwise: Still stuck? Ask me a question!
:pushpin: Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Re: How to programatically find the signed user of the desktop app

vsTheijs
Explorer | Level 4

Okay, I have one more idea. Maybe this will work better.

In the root folder on your desktop, there is a hidden file called '.dropbox'. The content of this file looks something like this:

{"tag": "dropbox", "ns": 1234567890}

If I compare the namespace id with the namespace id that I get through the API, that should be a pretty solid way to be sure that the correct user is signed in, right?

Are these namespace ids unique just for the specific user or over all users?

Re: How to programatically find the signed user of the desktop app

Daphne
Dropboxer

Hey again @vsTheijs!

I wouldn't want to give you any inaccurate info on this, so I'd suggest having a look at our dedicated API area for similar questions or even to start your own discussion.

A member of our team who specialises in this area is very active there and should be able to help you out, although a good place to start might be with this thread.

Sorry that I can't be of much help here, but do let me know if you have any other questions.

I hope this helps!


Daphne
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, please give it a Like below.
:arrows_counterclockwise: Still stuck? Ask me a question!
:pushpin: Tips & Tricks Find new ways to stay in flow or share your tips on how you work smarter with Dropbox.

Poll
Do you work or study in the creative industry? If so, which area?
If you use Adobe, don't forget to check out our latest integrations update here.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?