voz

"Invalid request" when opening web GUI & APIs

Recommended Posts

Hi, I use an evaluation API key for building an application around the sync API. Till few days ago everything worked well and I was able to call the APIs successfully.

Now when I start the Sync on one of my machines with a config file (please see below), I can not open http://127.0.0.1:888, it just shows "Invalid request". I get the same response on all API calls on that machine. This behaviour is the same across browsers: Chrome/Safari/Firefox.

Interestingly, on other development machines everything works well and the APIs work as expected. So the evaluation key seems to be valid (it should still be valid for another 3 month). 

We run:

  • Mac OS 10.11.3
  • Sync 2.3.1 (259)

 

Any idea what could be the reason? Could it be related to the fact that I am using an evaluation key or it is something else?

My config file as it is:
 

{
    "agree_to_EULA": "yes",
    "device_name": "xyz-server",
    // path to folder where Sync will store its internal data,
    // folder must exist on disk
    "storage_path" : "/xyz/system/btsync/metadata",
    // run Sync in GUI 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" : "abc",
        "password" : "def",
        // replace xxx with API key received from BitTorrent
        "api_key" : "MY-API-KEY"
    }
}

 

Share this post


Link to post
Share on other sites

@RomanZ I've tried cleaning the cookies and also the anonymous mode of Chrome, the result is the same. 

Yes, I make a call for a token every time.

I've also tried removing and installing again the Sync and specifying a clean metadata folder, it did not help.

Share this post


Link to post
Share on other sites

@acp When you run your Sync, try adding one more switch: --nodaemon. This will force Sync to run in existing console and dump some information about what happens. Try to do that and see if there is anything specific about API mode. You can also PM me the log so i'll take a look what happens.

Share this post


Link to post
Share on other sites

@RomanZ thanks for trying to help

I've put --nodaemon and no logs appear, the same as without it.

I run /Applications/BitTorrent\ Sync.app/Contents/MacOS/BitTorrent\ Sync --nodaemon --config /xyz/system/btsync/btsync_config.json from my terminal, it launches the Sync, but there is no output in the terminal.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.