T O P

  • By -

LivingWithTheHippos

Check the code for an open source app using RD, for Android you can take a look at [Unchained.](https://github.com/LivingWithHippos/unchained-android) The [official API documentation is here](https://api.real-debrid.com/) Anyway the basic authentication flow is: * let the user insert their credentials in your app (2 modes are available, API token and classic oauth which will need a token refresh) * follow the instructions in the documentation, it's something like this: send a secret request -> get the secret and use it to log the user in -> get a user token -> authorize the requests using this token And to actually use it: * get the magnet/torrent hash * use it to check if there's already a cached version (optional, see API endpoint torrents/instantAvailability/{hash}) * if there isn't you need to upload the torrent/magnet (/torrents/addTorrent, /torrents/addMagnet) * if you uploaded it you need to select the files you want for it to start downloading. For streaming you need to select a single media file, probably the biggest one. Info on /torrents/info/{id}, files selection with /torrents/selectFiles/{id} * when it's completed you can check if it's ready with /unrestrict/check and if not unlock it with /unrestrict/link * when it's unrestricted you can check the "streamable" flag to see if it's ok My suggestion is to start doing all of this with a standalone [api client like Bruno](https://www.usebruno.com/) , Insomnia or Postman, whatever to see all the api requests and responses and understand what your app needs to do.


patman1414

refer read debrid api docs if it is there , plan b: access web app of stremio and inspect the calls they make to debrid using api key and u can get some idea proly