google-api-python-client, posts().list() gives 404 Not found

Alistair <[email protected]>
Newsgroups gmane.comp.web.blogger.api
Message-ID <[email protected]>
I'm struggling with the google api client library for python. I'm 
successfully using oauth 2.0 to get a list of blogs for an authenticated 
user but when I try to get a list of posts for a specific (private) blog I 
get 'HttpError 404 ... returned "Not found"'.

The relevant code snippet is:
  from apiclient.discovery import build
  ...

  service = build('blogger', 'v3', http=http)

  response = service.blogs().getByUrl(url=args.url).execute()
  id = response['id']
  if debug: print 'blogId =',id

  # Test that using a blogId works
   response = service.blogs().get(blogId=id).execute()
  if debug: print 'response =',json.dumps(response, indent=2)

  # Get list of posts
   response = service.posts().list(blogId=id).execute()
The last line leads to the exception:

> googleapiclient.errors.HttpError: <HttpError 404 when requesting 
> https://www.googleapis.com/blogger/v3/blogs/<MyBlogIdWasHere>/posts?alt=json 
> returned "Not Found">


Curiously, the Google APIs explorer behaves the same way which makes me 
think wonder is something out of my control is wrong. If I enter my blogId 
(and authenticate) at

https://developers.google.com/apis-explorer/#s/blogger/v3/blogger.blogs.get

I get a sensible response which contains a selfLink for "posts". But if I 
enter my blogId at

https://developers.google.com/apis-explorer/#s/blogger/v3/blogger.posts.list

I get this response:

> 404 Not Found
>  
> - Show headers -
>   
> {
>  "error": {
>   "errors": [
>    {
>     "domain": "global",
>     "reason": "notFound",
>     "message": "Not Found"
>    }
>   ],
>   "code": 404,
>   "message": "Not Found"
>  }
> }

This suggests to me there's a problem with the blog that I'm testing with, 
which IS private (blog authors only). But if the authenticated user is the 
blog owner why is the authenticated request not being let through?

Any pointers would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.