delegatevoid

Members
  • Posts

    65
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by delegatevoid

  1. Here are the values for result I've figured out so far (for AddFolder): 2 There are some parameters missing from the request, for example if you forget the secret100 The local folder (dir) you specified does not exist or is not accessible200 The folder has already been added to BTSync, in this case they are reffering to the fact that the used key has already been registered as a synced folder201 The secret key you specified has an invalid length103 The specified folder is not a btsync folder As I continue implementing I'm sure I'll find more, would be great though if the devs just published this info.
  2. According to the documentation the response to an add_folder request is { "error": 0 }Which is true when there is no error, however if, for example you specify an invalid key the response is: { "message": "This secret is invalid.\nPlease generate a new secret or enter your shared folder secret.", "result": 201 }I think result should be error? It would also be good if we actually had a list of the errors that we can expect from the api.
  3. @Johnny2Shoes: I got it working on Windows 8.1, so I'm guessing it'll work on 8.0 as well. I did find that using anything other than the 'working directory' as the storage_path fails. The following configuration works for me: { // path to folder where Sync will store its internal data, // folder must exist on disk"storage_path" : "./", // run Sync in GUI-less mode "use_gui" : true, "webui" : { // IP address and port to access HTTP API "listen" : "127.0.0.1:8888", // login and password for HTTP basic authentication // authentication is optional, but it's recommended to use some // secret values unique for each Sync installation "login" : "api", "password" : "secret", // replace xxx with API key received from BitTorrent "api_key" : "" }}The key here is "storage_path" : "./" This will create the storage path in the same directory as the btsync executable, which is probably not a bad thing since this will be your application directory if you integrate it with your own software. This will also prevent storage_path collisions with other instances of btsync on the computer.
  4. Hi, So it turned out I was using an older version and the auto update and manual update features didn't work. I manually installed a newer version and after playing with the storage_path variable a bit I got it working. That settings seems to be a fragile point. Either way, if the BTSync devs are reading this, when the config file is invalid the application really should dump some information in the log file or provide some feedback on the command line. I'm also wondering, have not tried, will do so later, if it's possible to run multiple instances (with their own storage_path) otherwise if you integrate your software with btsync nobody else can do so on the same computer. Of course at this time, distributing your app is impossible anyway because it requires you redistribute the API key in plain text. Thnx for the help everyone!
  5. Hi, That doesn't help me. I've done the exact same thing, but btsync still ignores the config file. For example, I told it not to use a GUI and it does. Also it starts the web server but not with username api/secret but the default username and password instead. To give you an idea, this is the console/cmd session: E:\Program Files (x86)\BitTorrent Sync>dir Volume in drive E is Program Files Volume Serial Number is 3212-2BC0 Directory of E:\Program Files (x86)\BitTorrent Sync15/11/2013 10:36 <DIR> .15/11/2013 10:36 <DIR> ..31/10/2013 13:12 1 538 920 BTSync.exe15/11/2013 10:33 823 sync.conf 2 File(s) 1 539 743 bytes 2 Dir(s) 400 937 422 848 bytes freeE:\Program Files (x86)\BitTorrent Sync>BTSync.exe /config sync.confE:\Program Files (x86)\BitTorrent Sync>At this point btsync starts, it just doesn't use my config file.
  6. Hi, I've copied the content of the example config and modified the storage_path and api_key properties. I've placed it in the same directory as btsync.exe as btsync.conf { "storage_path" : "./", "use_gui" : false, "webui" : { "listen" : "127.0.0.1:8888", "login" : "api", "password" : "secret", "api_key" : "thesecretapikeythatwehavetosharewitheveryone" }}Of course on my system the api_key corresponds with my own secret api key as received by mail. I then try to launch it from the command like like so: btsync.exe /config btsync.confBut that simply starts btsync like it does normally, with the GUI enabled and the web interface disabled or at least not using the settings as specified in the config file. I have tried various values for storage_path such as: .//p:\btsyncapip:/btsyncapip:\btsyncapi\p:/btsyncapi/And btsyncapi is an empty folder on my 'p' drive, so it does exist. So apparently it btsync seems to ignore the config file and I cannot find any indication of what's going on in the logs, there is no feedback of any kind. Can someone tell me what I'm doing wrong? System: Windows 8.1
  7. I have to agree with capi. Since the API key has to be stored in a config file that means you can't actually redistribute your application if you don't want your API key to fall into the hands of the public.