Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Omri1984
4 years agoExplorer | Level 4
Access token not beeing refreshed automatically
my application support old dropbox and the new one. when creating the client i am creating it like this client = new DropboxTeamClient(request.AccessToken, request.RefreshToken,request.Expires,Cl...
Omri1984
4 years agoExplorer | Level 4
i an not understand and will need more assistance.
in my up i am always using the DropboxTeamClient creating it with all the necessary parameters
like this.
var client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientId, ClientSecret);
now after that i am checking if the client is in the new space or the old one
like this
var account = await client.AsMember(request.AsMember).Users.GetCurrentAccountAsync();
var spaceclient = client.AsMember(request.AsMember).WithPathRoot(new PathRoot.Root(account.RootInfo.RootNamespaceId));
if (account.RootInfo.IsTeam)
{
metadata = await spaceclient.Files.ListFolderAsync(folderId);
}
else
{
metadata = await client.AsMember(request.AsMember).Files.ListFolderAsync(folderId)
}
now sometimes i need to call this
client.Team.MembersListAsync().ConfigureAwait(false);
and befoe every call i am calling the
var client = new DropboxTeamClient(request.AccessToken, request.RefreshToken, request.Expires, ClientId, ClientSecret);
and I need it because that sometimes i am handing for the same client al the data content and all the user and groups as well
and my issue is that after the token is expire i am getting the error that was in the first message .
400 error
i am really need to get to the bottom of this and understand is completely
Thank you
Здравко
4 years agoLegendary | Level 20
Hi Omri1984,
Can you just print (or display somehow) content of "request.RefreshToken"? Is there something that looks like valid refresh token or not exactly? 🧐
Hope this gives direction.
- Omri19844 years agoExplorer | Level 4
something like this
ZEaFs***lgUAAAAAAAAAARUCp-9WwOK************************PIUr3P72**********Eg
does it make sense ?
- Здравко4 years agoLegendary | Level 20
Hi again Omri1984,
To be honest I expected your token empty, but it seems Ok, at least. Let's see is it really Ok or not actually. Execute following command in terminal:
curl https://api.dropbox.com/oauth2/token -d grant_type=refresh_token -d refresh_token=ZEaFs***lgUAAAAAAAAAARUCp-9WwOK************************PIUr3P72**********Eg -u 12APP_KEY3HERE45:abcAPP_SECRETdHEREefg
Place actual values on their corresponding places. You can use other standalone HTTP client, able to perform such a request, if curl is missing or inconvenient for your. Does the command completes successfully or gives back error (if error, what kind of error - post the result)?
- Omri19844 years agoExplorer | Level 4
will test it,
if i am asing a token with the business app or with the user app does the token is different between ?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!