Moe

Members
  • Posts

    624
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Moe

  1. Yeah I agree with you that it is a valid feature request and also that OwnCloud has it's own issues :>

    But it seems that BitBox is not a P2P service though when you have to have a webspace somewhere to make the file accessible..

    If there was some sort of magic in the background to make all that happen on P2P basis please enlighten me :D

    Otherwise you are out of luck ;-)

  2. Wait wait wait, did I understand this correctly if I get a lifetime license for 40 dollars? Yes this is a serious question, I just want to make sure before I make a purchase. If this is the case, that's super awesome and I'm very happy. 40 dollars for a year was a bit pricy, but for a lifetime license? That's just awesome.

     

    Yes.

  3. For when I don't get a response, no "invalid" error the curl -v output looks like this:

    pi@raspberrypi:~/test/btsync/api$ curl -v -b cookie -u wrong_user_admin:password -X POST -H "Content-Type: application/json" -d '{"path":"/mnt/btsync/Moe/api/", "secret":"XXXXXXXXXXXXXXXXX" }' http://localhost:8888/api/v2/folders?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX* About to connect() to localhost port 8888 (#0)*   Trying 127.0.0.1...* connected* Connected to localhost (127.0.0.1) port 8888 (#0)* Server auth using Basic with user 'wrong_user_admin'> POST /api/v2/folders?token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1> Authorization: Basic XXXXXXXXXXXXXXXXXXX> User-Agent: curl/7.26.0> Host: localhost:8888> Accept: */*> Cookie: GUID=QzCE1Uz1em5QoKyKgqRf> Content-Type: application/json> Content-Length: 78>* upload completely sent off: 78 out of 78 bytes* HTTP 1.1 or later with persistent connection, pipelining supported< HTTP/1.1 401 Unauthorized< Connection: close< Content-Length: 0< Content-Type: text/html* Authentication problem. Ignoring this.< WWW-Authenticate: Basic realm="BitTorrent Sync"< Cache-Control: no-cache<* Closing connection #0pi@raspberrypi:~/test/btsync/api$

    The username should be admin and not wrong_user_admin.

    If username is correct, everything is working like expected.

  4. Ok so for reference to whovever is going to read all this:

    Try to put a wrong password in the curl request.

     

    I have a username and password set in my BitTorrent Sync config file so I have to call curl with -u

     

     

    @zycho42: Take a look at the sample projects: https://github.com/bittorrent/sync_slack

    You can get a hang of it and copy pasta stuff together to make a nice script.

    And I definitely recommend using either Googles Go or Python for it.

  5. You have to add the token to your request URL like in the example below

     

    And how to add the folder is explained here: https://www.getsync.com/intl/de/api/docs#_folders_post

     

    So AFAIK you have to make the request like this:

    curl -b ~/btsync.cookie -u admin:pwd -X POST -H "Content-Type: application/json" -d '{"path":"/path/to/folder", "secret":"yoursecretgoeshere" }' http://localhost:8888/api/v2/folders?token=tokengoeshere

    Make sure the folder exists on your filesystem, and if not you can add another value to the json request which is

    "force" : "true"

    That did work for me at least.

  6. Yeah no problem! I was just waiting for them to update the API page.

     

    So I have this directory

    cd ~/test/btsync/api

    I then make the token request using curl like this:

    curl -c cookie -u admin:password -X GET http://localhost:8888/api/v2/token

    With the option -c I am writing the cookie to a file called cookie inside of ~/test/btsync/api

    The -u option is for the basic authentication of the username and password set in my current config file found close by your binary. In my case it is in ~/.btsync and is just called config.

     

    I then get a token response that looks like this:

    pi@raspberrypi:~/test/btsync/api$ curl -c cookie -u admin:password -X GET http://localhost:8888/api/v2/token{ "data": { "token": "tokenishere" }, "method": "GET", "path": "/api/v2/token", "status": 0 }pi@raspberrypi:~/test/btsync/api$

    You then take the token you get and put it to your POST request but also, which is the most important thing, you need to use the cookie you got with it with the option -b:

    curl -b cookie -u admin:password -X POST -H "Content-Type: application/json" -d '{"type": 1}' http://localhost:8888/api/v2/secret?token=tokenishere

    You will end up with 2 secrets

    { "data": { "rosecret": "hereismyrosecret", "secret": "hereismyrwsecret" }, "method": "POST", "path": "/api/v2/secret", "status": 0 }

    The RO secret is longer than the RW secret and there is a trick you can use to get the encrypted secret!

    Look here: http://forum.bittorrent.com/topic/25823-generate-encrypted-read-only-secret-without-api-key/?p=76262

     

    Right now it only works with the way above but that is a known bug and is on the list on bugs to be fixed.

    In a future release you will get a 3rd secret which is the encrypted secret.

     

    You can also, if you add the RW key to one of your machines, go to the preferences of that share you added the key to and see a third key in the GUI which is the encrypted one.

    The api is just not giving out the encrypted key..

  7. IMO this seems to be a bug.

    I know exactly what you mean and I think the welcome screen is just missing the option.
     

    Let's wait and see if one of the Sync Team members knows something about it.

     

    So they have changed the procedure to where you have to create a second Identity first and then link it to your original one - more switch to your original one.

     

    You can follow the steps here:

    http://help.getsync.com/customer/en/portal/articles/1901247-sync-private-identity-linking-my-devices

  8. Short answer: No, Sync is not for sharing a single file. You have to add a folder and then put a file in it.

     

    The setup I have with my friends is, that we have a share (for each friend I have one) called temp and in that thing I just drop stuff that is temporary like a any kind of file that I want to give them right away.