title: Insert post Blogger API failing with Python
body: <p>This code now works.</p>
  
  <p>I'm having an issue inserting a new blog post on to google's Blogger site via python2.7 calling an API.
  I have all the oauth2client modules from google to handle the authentication.
  I have permission to use the Blogger V3 api - this is activated on the google developer console.
  I have run simple api requests with the same credentials.dat that have worked:</p>
  
  <p>this worked (full code not included)</p>
  
  <pre><code>service = build('blogger','v3', http=http)
  try:
      request = service.blogs().get(blogId="6814573853229626501")
      response = request.execute()
      print response
  </code></pre>
  
  <p>The google api discovery service leads me to believe this is what the code should look like to insert a post
  <a href="https://developers.google.com/apis-explorer/#p/blogger/v3/blogger.posts.insert" rel="nofollow">https://developers.google.com/apis-explorer/#p/blogger/v3/blogger.posts.insert</a></p>
  
  <pre><code>service = build('blogger','v3', http=http)
  
  try:
      body = {
          "kind": "blogger#post",
          "id": "6814573853229626501",
          "title": "posted via python",
          "content":"&lt;div&gt;hello world test&lt;/div&gt;"
          }
  
      request = service.posts().insert(blogId="6814573853229626501",body=body)
  
      response = request.execute()
      print response
  </code></pre>
  
  <p>I'm sure it's the body=body part that I'm messing up?  Any clues?</p>
  
  <p>here is the error that I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "blogger.py", line 104, in &lt;module&gt;
      main()
    File "blogger.py", line 93, in main
      response = request.execute()
    File "/usr/local/lib/python2.7/dist-packages/google_api_python_client-1.0c2-py2.7.egg/apiclient/http.py", line 654, in execute
      raise HttpError(resp, content, self.uri)
  apiclient.errors.HttpError: &lt;HttpError 400 when requesting https://www.googleapis.com/blogger/v3/blogs/6814573853229626501/posts?alt=json returned "Invalid Value"&gt;
  </code></pre>
  
  <p>If you're interested I'm experimenting with posting charts from my google fusion tables generated by eBay data that i'm interested in at the time.</p>