cURL not working

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
jamesjrcarter23
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 26 Feb 2015, 19:16

cURL not working

Postby jamesjrcarter23 » 26 Feb 2015, 21:03

I have been trying to access the api through terminal using : (curl -d '{"op":"login","user”:"user","password”:"password"}' http://my_server.com/api/ ) but it is not working. The respond that I get is:
{"seq":null,"status":1,"content":{"error":"NOT_LOGGED_IN"}}

Also I have tried: ( curl -d '{"op":"isLoggedIn"}' http://my_server.com/api ) but the response that I get is:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://178.62.122.220/ttrss/api/">here</a>.</p>
<hr>
<address>Apache/2.2.22 (Debian) Server at 178.62.122.220 Port 80</address>
</body></html>


Does any one have a idea of what is wrong?

Latimer
Bear Rating Master
Bear Rating Master
Posts: 131
Joined: 17 Mar 2013, 19:35

Re: cURL not working

Postby Latimer » 26 Feb 2015, 21:49

I would guess these weird characters are responsible:

curl -d '{"op":"login","user:"user","password:"password"}' http://my_server.com/api/

e: you removed your server address from the commands you're running, but not from the response you're quoting.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: cURL not working

Postby fox » 26 Feb 2015, 22:07

nice kb post, op

e: i have no idea why are there even subforums because not one of you retards ever bothers reading anything before posting your dumb question


Return to “Support”

Who is online

Users browsing this forum: No registered users and 12 guests