Hi,
I’m trying to connect an Arduino over wifi to my RSS feed on Newsblur. I’m very new to this and wanted to see if I’m way off track. I’m attempting to authenticate using the ‘POST’ command. When I try, I get the following message back on my serial monitor:
open newsblur.com 80
Connected to newsblur.com
HTTP/1.0 403 FORBIDDEN
Server: gunicorn/0.17.2
Date: Wed, 03 Jul 2013 00:08:51 GMT
X-Homer: Marge, you being a cop makes you the man! Which makes me the woman - and I have no interest in that, besides occasionally wearing the underwear, which as we discussed, is strictly a comfort thing.
Content-Type: text/json
X-gunicorn-server: app14
Vary: Cookie
{“code”: -1, “error”: “User agent banned: missing”}
I want to know if I can keep slowly hacking away till I get it, or if I need to get something reset. Have I simply failed to authenticate, or have I made a request that flagged my account (user agent banned)? Hope I haven’t upset the powers that be
Thanks for your time!
Sam F.
1 Like
Could it be you didn’t add a user agent at all? That’s actually what the error is saying
1 Like
Oh, that is absolutely possible.
The only request I’ve sent (I think) to the site is ‘POST /api/login/’. I am still learning the basic structure for HTTP and the Arduino IDE, so I’m simply using trial and error and guessing how to add my user info. I was able to connect and receive data back from a different site using an API key they provided, but I’m having trouble adapting it to Newsblur.
Thanks for the response!
Yep, you need to send “User-Agent” in your headers with a proper identity.
1 Like
If someone could provide a sample code for how to authenticate using API, it would be greatly appreciated! I don’t know how to take the Newsblur.com/api guide and add my information.
I do it like this:
POST http://www.newsblur.com/api/login HTTP/1.0
Content-Type: application/x-www-form-urlencoded
User-Agent: Add your user agent here
Host: www.newsblur.com
Content-Length: 37
username=whatever&password=1234567890
Just be sure to change the text after "User-agent: ", use your username / password and calculate the content length (its the length of the string “username=whatever&password=1234567890”).
Cheers!
1 Like
Thank you, Bernhard! I will give it a try!