Rupesh Mashru Posted March 14, 2016 Report Share Posted March 14, 2016 Hi, We are new to using the BitSync. We installed it as a service. The GUI works fine http://127.0.0.1:8888 The API always returns "Invalid Request". We tried calling the API using http://127.0.0.1:8888/api?method=get_folders and http://127.0.0.1:8888/api/ with the same result. Can someone please help. We are using a trial API key for learning how to use the BitSync Torrent API. Thanks, Rupesh Quote Link to comment Share on other sites More sharing options...
GreatMarko Posted March 14, 2016 Report Share Posted March 14, 2016 You're accessing the GUI over port 8000, yet attempting to make API calls over port 8888? Quote Link to comment Share on other sites More sharing options...
Helen Posted March 14, 2016 Report Share Posted March 14, 2016 Rupesh, The request will be http://127.0.0.1:8888/api/v2. Also, you need to GET and then use valid token and cookies in each request: http://127.0.0.1:8888/api/v2/token...... I suggest checking documentation on API v2, here Also, if you've set to use ui on port 8000, why you send requests on 8888? Quote Link to comment Share on other sites More sharing options...
Rupesh Mashru Posted March 14, 2016 Author Report Share Posted March 14, 2016 Hi GreatMarko and Helen, Sorry for the typo. The GUI is also being accessed at port 8888 and not 8000 as posted in the question above. As suggested tried accessing "http://127.0.0.1:8888/api/v2/token". It still says invalid request. Thanks, Rupesh Quote Link to comment Share on other sites More sharing options...
Rupesh Mashru Posted March 14, 2016 Author Report Share Posted March 14, 2016 Just for additional info, below is the conf file we are using: { /* my sample configuration file */ "device_name": "DIADEISMUMLAP32", "listening_port" : 3000, // 0 - randomize port "download_limit" : 0, // 0 - no download limit "upload_limit" : 0, // 0 - no upload limit "agree_to_EULA" : "yes", // Agree to the eula "storage_path" : "d:\btsync", "use_gui" : false, "webui" : { "listen" : "127.0.0.1:8888", // Listen on all ports "login" : "rupesh", "password" : "password", "api_key" : "[Actual API KEY]" } } Quote Link to comment Share on other sites More sharing options...
Helen Posted March 14, 2016 Report Share Posted March 14, 2016 the only wrong thing about your config I see is "storage_path" : "d:\btsync". use double slash "storage_path" : "d:\\btsync". Didn't the system warn you about "bad storage path when launching Sync with this config? Double check it (in Process Explorer, for example), that Sync indeed runs using this config. Other than double slash, this config works fine on my machines and token is returned. Quote Link to comment Share on other sites More sharing options...
Rupesh Mashru Posted March 15, 2016 Author Report Share Posted March 15, 2016 Hi Helen, Thank you so much for your help. We got it to work. Like you pointed out, the issue was that it was not using any config. We changed the path in the registry "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\btsyncsvc\ImagePath " to "C:\ProgramData\BitTorrent Sync Service\BTSync.exe" /SVC /config "C:\\ProgramData\\BitTorrent Sync Service\\btsync.conf" and it was able to pick the values from the .conf file. The earlier path to the config was not having "\\". Thanks again. Regards, Rupesh Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.