GithubHelp home page GithubHelp logo

Comments (5)

MDKPredator avatar MDKPredator commented on July 22, 2024 2

Hi @growtopiajaw,

I had the same problem. Try to put the default_properties.txt file in the same directory where the credentials file credentials.json is. This solved the error 400 problem

from degoo.

bernd-wechner avatar bernd-wechner commented on July 22, 2024

400 of course is malformed request. I just checked on my instance and it's working fine, so it;s not a case of an obvious API change (the API is a sluggishly moving target of course). Which suggests there's a bug in the script (a broken premise). It would be great to nail what it is.

I an instrument it up with a debug command line option which dumps the HTTP request and response, which isn't a bad idea for on-the-fly drill down into such errors.

In the mean time, if you're comfortable enough with Python you can take a look here:

def getFileChildren3(self, dir_id):

which is what's giving you the 400 error, and what I'd do is log the the full request and response just after this:

response = requests.post(URL_API, headers=header, data=json.dumps(request))

and we can compare. If you do that and post it here, make sure to anonymise the Token in the request as a precaution (they don't seem to expire, though I should hope they invalidate when you logout, haven't tested that yet, but this Token technically provides access to your data while you're logged in).

You'll see that Token where the request is built:

request = { "operationName": "GetFileChildren3",

Then to get a reference what I'd do is surf to degoo.com in a browser, open the debug window and the network page there (Firefox and Chrome are very similar there). Clear the network history if needed, then log in to degoo. A trace appears and among the long list is a getFileChildren3 request. I save that in JSON format and format it nicely and then compare with mine.

As this is a black box reverse engineering of their API this is the option we have, and I'm certainly happy to learn from your experience (i.e. improve our understanding of their API).

Another thing to try is if degoo_put and degoo_get exhibit the same problem, or if they work. I just put a pile, then get it again for such a test.

On possible source of this is the devices conundrum. The top level folders on a degoo filesystem as it's presented on their web interface is called a device. These cannot be created. You have what you have. So you have to surf into a device (degoo_cd) before you can put a file.

There's also a slim possibility that they build their request a little differently based on the user, their license, or whatever, and I'd be really curious to get a getFileChildren3 request that you've logged to learn if that's the case. I have only one account and hence only that one view on their API of course.

from degoo.

growtopiajaw avatar growtopiajaw commented on July 22, 2024

Hello @MDKPredator,
I can happily report back that this solution does indeed work! Thanks for pointing this out to me. Honestly, without your solution, I might never be able to get this working.

7CE33384-A069-4D3B-B6B8-4EE8DFE2A549
Running on my Android phone :)

from degoo.

bernd-wechner avatar bernd-wechner commented on July 22, 2024

Hi @growtopiajaw,

I had the same problem. Try to put the default_properties.txt file in the same directory where the credentials file credentials.json is. This solved the error 400 problem

Thanks enormously. That's what happens when we have unfinished work - or a WIP (Work In Progress) ;-). No installer yet. That said, it's worth a quick fix to make this more obvious when it happens. I admit I just push things to github as a backup and hadn't really expected anyone else to be trying this just yet ;-).

from degoo.

growtopiajaw avatar growtopiajaw commented on July 22, 2024

Well, it’s alright. I guess that’s why we are here 😅

from degoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.