Want to know more about Dash? Check out how Amy uses Dropbox and Dash to make her day easier here!
Forum Discussion
Omri1984
2 months agoExplorer | Level 4
Dropbox paper - is there a way to extract old dropbox paper using SDK/API
Hi,
i am trying to understand.
1. there is Dropbox paper that are in the dropbox filesystem shoeing like test.paper
2. and there is the dropbox paper (app or website) that do not include in the filsystem.
is there a way to extract the second papers number 2?
6 Replies
- DB-Des2 months ago
Dropbox Community Moderator
In order to get the user's features values, you'll need to first create an instance of the parameter "paper_as_files":
UserFeature.PaperAsFiles paperAsFiles = UserFeature.PaperAsFiles.Instance;
You can then add the new instance of this parameter to a list of 'UserFeature':
var featuresList = new List<UserFeature> { paperAsFiles };
Lastly, you can pass the 'featuresList' list to the 'FeaturesGetValuesAsync()' method:
var featureValues = await dbx.Users.FeaturesGetValuesAsync(featuresList);
You can determine if this feature is enabled for this account or not by retrieving the value of the "enabled" property. Since the response is an array of "values", you can loop through the values like this:
foreach (var value in featureValues.Values) { Console.WriteLine(value.AsPaperAsFiles.Value.AsEnabled.Value); }
To answer your other questions:
how can I tell if a legacy paper are exists?
If 'Paper.DocsListAsync()` method is returning 0 values, it is most likely that your Paper docs are being saved as files in your Dropbox account (i.e., not legacy). But you will need to confirm based on the value returned from 'FeaturesGetValuesAsync()'.
can I migrate legacy paper to the new papers
It is not possible to migrate legacy Paper docs to how they are handled now.
the new paper I am able to find and export, are the old one should be under one place in one list ?
Legacy Paper files used to be stored under a folder named "Paper Docs" inside users' Dropbox accounts.
can we have a quick zoom call together?
Due to our operational structure, we do not facilitate phone or video calls.
can you help with the get value method is C# or .NET SDK
If you are still having trouble, we can continue helping you to the best of our ability.
what format legacy paper can be downloaded?
Could you clarify what you mean by this?
- Omri19842 months agoExplorer | Level 4
Hi I am trying to make a request to "features/get_values"
but was unable to successed.
each time i am getting a different error.
I tried with the SDK
var featuresList = new List<UserFeature>
{
UserFeature.PaperAsFiles;
};// Prepare the request as a member
var request = new UserFeaturesGetValuesBatchArg(featuresList);
var features = await client.AsMember(request.AsMember).Users.FeaturesGetValuesAsync(request);but did not manage to make a request something is not working for me maybe the syntax I am using is wrong
i tried the api
var requestBody = new
{
features = new object []{
"{\".tag\": \"paper_as_files\"}",
}
};var tttt =
"AuthToken_XXX";
using (var cclient = new HttpClient())
{
cclient.DefaultRequestHeaders.Add("Authorization", "Bearer " + tttt);
cclient.DefaultRequestHeaders.Add("Dropbox-API-Path-Root", "{\".tag\": \"namespace_id\", \"namespace_id\": \"2433194819\"}");
cclient.DefaultRequestHeaders.Add("Dropbox-API-Select-User", request.AsMember);
string s = Newtonsoft.Json.JsonConvert.SerializeObject(requestBody);
var content = new StringContent(s, Encoding.UTF8, "application/json");var rres = await cclient.PostAsync("https://api.dropboxapi.com/2/users/features/get_values", content);
var tt = rres.Content.ReadAsStringAsync();
but got this response
"Error in call to API function \"users/features/get_values\": request body: features: unknown tag '{\".tag\": \"paper_as_files\"}'"
also i just tried get the papers
var paper = await client.AsMember(request.AsMember).Paper.DocsListAsync();
var paper = await spaceclient.Paper.DocsListAsync();
but it is always showing me 0
- how can I tell if a legacy paper are exists?
- can I migrate legacy paper to the new papers
- the new paper I am able to find and export, are the old one should be under one place in one list ?
- can we have a quick zoom call together?
- can you help with the get value method is C# or .NET SDK
- what format legacy paper can be downloaded?
- DB-Des2 months ago
Dropbox Community Moderator
Yes, Paper endpoints (though deprecated) can still be accessed using the .NET SDK. You can find documentation on these here: https://dropbox.github.io/dropbox-sdk-dotnet/gh-pages/obj/api/Dropbox.Api.Paper.html.
- Omri19842 months agoExplorer | Level 4
can it be access via .Net SDK?
- DB-Des2 months ago
Dropbox Community Moderator
Hi Omri1984,
Paper docs can still be accessed via the API, which endpoints to use depend on your version of Paper. You can find more details on the Paper Migration Guide.
- Omri19842 months agoExplorer | Level 4
I can see that it is obsolete
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,017 PostsLatest Activity: 3 days ago
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 or Facebook.
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!