API: Cannot authenticate

Hi there!

I recently just signed up to Newsblur and I wanted to try out the API, but for some reason when I try to authenticate via Postman, or cURL, I either get an error saying password is incorrect, or enter username.

When I try via cURL with the following command:
curl -X POST --cookie-jar session.newsblur -d username=myusername -d password='mypassword' https://www.newsblur.com/api/login

I get error:
{"code": -1, "errors": {"__all__": ["Whoopsy-daisy, wrong password. Try again."]}, "result": "ok", "authenticated": false}

And when I try it via Postman via a POST request to:
https://newsblur.com/api/login?username=myusername&password=mypassword

I get response:

{
    "code": -1,
    "errors": {
        "username": [
            "Please enter a username."
        ]
    },
    "result": "ok",
    "authenticated": false
}

Am I missing something here?

Thanks in advance.

For the second issue, you’re setting the query parameters to username and password, but for a POST request you have to send it in the body as form-encoded data. So the error message is telling you that you didn’t provide a username in the body, which is accurate.

For the first issue, I’m not sure why the password doesn’t work, but try changing it on the web and seeing if it works. It’s likely an encoding issue, so try to ensure you don’t have any special characters in the password.