Google Reader API Error 401 with OAuth 2
I currently can list feeds/stories for a user using OAuth 2-- there's no problems with reading data. But when I try and edit data (basically just setting an item to be read at this point), I get a 401 error every time.
I already got the action token and am requesting with POST parameters like this to the URL (http://www.google.com/reader/api/0/edit-tag?client=scroll):
a=user/[MY USER'S ID]/state/com.google/read
&async=true
&i=tag:google.com,2005:reader/item/8771267769dbcce7
&s=feed/http://www.engadget.com/rss.xml
&T=//TrlgESBf1OtxJR5xuzh8Gw
I have also tried it with the oauth_token in the POST body-- still a 401 error. If I put oauth_token as a parameter in the URL, I get a 400 Bad Request instead. With T in the URL query string, I still get the 401 error. I've also tried URL escaping the Token and the OAuth Token. I do have a useragent set. I have tried HTTP and HTTPS as well.
What ex开发者_StackOverflowactly am I doing wrong here?
For whatever reason, passing the oauth_token as a query string or post value didn't work. Using the Authorization header worked.
精彩评论