API login returns bogus Session-Id

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 14 Feb 2014, 21:50

API login returns bogus Session-Id

Postby granted » 14 Feb 2014, 22:34

Hello everyone,
I've run into a rather strange problem. When trying to obtain a session-id through the API, I get "your-session-id" as the value for session_id.
I am writing a Chrome Extension that is meant to interact with the API (tt-rss v1.11) via jQuery. I am hosting the tt-rss instance on my Arch Linux VPS. I am still in the testing phase so this is just a snippet:

Code: Select all

function sendLoginRequest()
        type: "POST",
        url: "http://xxxxx/tt-rss/api/",
        data: '{"op":"login","user":"xxxxx","password":"xxxxx"}',
        contentType: 'application/json; charset=utf-8',
        dataType: 'text',
        success: function(data){

Now if I run above code in the browser the value I get for session_id is "your-session-id". The JSON that is returned is this:

Code: Select all


Oddly enough, if I send the same request with curl from my local machine I get a proper session_id:

Code: Select all

curl -d '{"op":"login","user":"xxxxx","password":"xxxxxx"}' http://xxxxxxxx/tt-rss/api/


Code: Select all


I'd appreciate any help.

As it turns out deleting the cookies in the browser actually resolved this issue. I'm assuming if the API script finds a cookie with the Session Id it will respond with "your-session-id". Not sure if that's on purpose. Anyways, problem solved :)

Return to “Support”

Who is online

Users browsing this forum: Google [Bot] and 12 guests