Blogger

Blogger API: Using the API

The Blogger API enables you to integrate Blogger content with your application by using the REST APIs. Before you begin, you will need to set up authorization.

Contents

Introduction

This document is intended for developers who want to write applications that can interact with the Blogger API. Blogger is a tool for creating websites that allow people to publish their thoughts on an ongoing basis.

If you're unfamiliar with Blogger concepts, you should read Getting Started before starting to code.

Authorizing requests and identifying your application

Every request your application sends to the Blogger API must identify your application to Google. You can identify your application by using an OAuth 2.0 token, which also authorizes the request, or using the application's API key. Here's how to determine which of those options to use:

  • If the request requires authorization, such as a request for an individual's private data, the application must provide an OAuth 2.0 token with the request.
  • If the request doesn't require authorization, such as a request for public data, then the application must provide either the API key or an OAuth 2.0 token.

Authorization protocols

Your application must use OAuth 2.0 to authorize requests. No other authorization protocols are supported.

Authorizing requests with OAuth 2.0

Requests to the Blogger API for non-public user data must be authorized by an authenticated user.

The details of the authorization process, or "flow," for OAuth 2.0 vary depending on the type of application you are developing. The following general process applies to all application types:

  1. When you create your application, you register it with Google. Google then provides information you'll need later, including a client ID and a client secret.
  2. Activate the Blogger API in the Services pane of the Google APIs Console.
  3. When your application needs access to user data, it asks Google for a particular scope of access.
  4. Google displays an OAuth dialog to the user, asking them to authorize your application to request some of their data.
  5. If the user approves, then Google gives your application a short-lived access token.
  6. Your application requests user data, attaching the access token to the request.
  7. If Google determines that your request and the token are valid, it returns the requested data.

Some flows include additional steps, such as using refresh tokens to acquire new access tokens. For detailed information about flows for various types of applications, see Google's OAuth 2.0 documentation.

Here's the OAuth 2.0 scope information for the Blogger API:

https://www.googleapis.com/auth/blogger

To request access using OAuth 2.0, your application needs the scope information, as well as information that Google supplies during application registration (such as the client ID and/or the client secret).

Tip: The Google APIs client libraries can handle some of the authorization process for you. They are available for a variety of programming languages; check the Libraries and Samples page for more details.

Acquiring and using an API key

  1. Go to the Google Developers Console.
  2. Select a project.
  3. In the sidebar on the left, select APIs & auth. In the displayed list of APIs, make sure the Blogger APIs status is set to ON.
  4. In the sidebar on the left, select Registered apps.
  5. Select an application.
  6. Expand the Browser Key or Server Key sections.

Working with blogs

Retrieving a blog

You can retrieve information for a particular blog by sending an HTTP GET request to the blog's URI. The URI for a blog has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId

Request

GET https://www.googleapis.com/blogger/v3/blogs/2399953?key=YOUR-API-KEY

A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the blog data:

{
  "kind": "blogger#blog",
  "id": "2399953",
  "name": "Blogger Buzz",
  "description": "The Official Buzz from Blogger at Google",
  "published": "2007-04-23T22:17:29.261Z",
  "updated": "2011-08-02T06:01:15.941Z",
  "url": "http://buzz.blogger.com/",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953",
  "posts": {
    "totalItems": 494,
    "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts"
  },
  "pages": {
    "totalItems": 2,
    "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/pages"
  },
  "locale": {
    "language": "en",
    "country": "",
    "variant": ""
  }
}

Retrieving a blog by its URL

You can retrieve a blog using its URL by sending an HTTP GET request to the following URI with a url parameter:

https://www.googleapis.com/blogger/v3/blogs/byurl?url=blog-url

Request

https://www.googleapis.com/blogger/v3/blogs/byurl?url=http://code.blogger.com/

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the full representation of the identified blog:

{
 "kind": "blogger#blog",
 "id": "3213900",
 "name": "Blogger Developers Network",
 "description": "The official Blogger Developers Network weblog.",
 "published": "2007-02-09T10:13:10-08:00",
 "updated": "2012-04-15T19:38:01-07:00",
 "url": "http://code.blogger.com/",
 "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900",
 "posts": {
  "totalItems": 55,
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900/posts"
 },
 "pages": {
  "totalItems": 1,
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900/pages"
 },
 "locale": {
  "language": "en",
  "country": "US",
  "variant": ""
 }
}

Retrieving a user's blogs

You can retrieve a list of a user's blogs by sending an HTTP GET request to the blogs collection URI:

https://www.googleapis.com/blogger/v3/users/userId/blogs

Request

GET https://www.googleapis.com/blogger/v3/users/self/blogs
Authorization: /* OAuth 2.0 token here */

Note: The user must be authenticated to list their own blogs, so you must provide the Authorization HTTP header with the GET request.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the full representation of the list of the user's blogs:

{
  "kind": "blogger#blogList",
  "items": [
    {
      "kind": "blogger#blog",
      "id": "4967929378133675647",
      "name": "Brett's Test Blawg",
      "description": "",
      "published": "2010-10-06T23:33:31.662Z",
      "updated": "2011-08-08T06:50:02.005Z",
      "url": "http://brettmorgan-test-blawg.blogspot.com/",
      "selfLink": "https://www.googleapis.com/blogger/v3/blogs/4967929378133675647",
      "posts": {
        "totalItems": 13,
        "selfLink": "https://www.googleapis.com/blogger/v3/blogs/4967929378133675647/posts"
      },
      "pages": {
        "totalItems": 1,
        "selfLink": "https://www.googleapis.com/blogger/v3/blogs/4967929378133675647/pages"
      },
      "locale": {
        "language": "en",
        "country": "",
        "variant": ""
      }
    }
  ]
}

Working with posts

Retrieving posts from a blog

You can retrieve a list of posts from a given blog by sending a GET request to the posts collection URI. The URI for a posts collection has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts

Request

Here is an example:

GET https://www.googleapis.com/blogger/v3/blogs/2399953/posts?key=YOUR-API-KEY

A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the list of posts:

{
  "kind": "blogger#postList",
  "nextPageToken": "CgkIChiAkceVjiYQ0b2SAQ",
  "prevPageToken": "CgkIChDBwrK3mCYQ0b2SAQ",
  "items": [
    {
      "kind": "blogger#post",
      "id": "7706273476706534553",
      "blog": {
        "id": "2399953"
      },
      "published": "2011-08-01T19:58:00.000Z",
      "updated": "2011-08-01T19:58:51.947Z",
      "url": "http://buzz.blogger.com/2011/08/latest-updates-august-1st.html",
      "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553",
      "title": "Latest updates, August 1st",
      "content": "elided for readability",
      "author": {
        "id": "401465483996",
        "displayName": "Brett Wiltshire",
        "url": "http://www.blogger.com/profile/01430672582309320414",
        "image": {
          "url": "http://4.bp.blogspot.com/_YA50adQ-7vQ/S1gfR_6ufpI/AAAAAAAAAAk/1ErJGgRWZDg/S45/brett.png"
         }
      },
      "replies": {
        "totalItems": "0",
        "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553/comments"
      }
    },
    {
      "kind": "blogger#post",
      "id": "6069922188027612413",
      elided for readability
    }
  ]
}

Retrieving a specific post

You can retrieve a specific post from a blog by sending a GET request to the posts resource URI. The URI for a posts resource has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/postId

Request

GET https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553?key=YOUR-API-KEY

A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post:

{
  "kind": "blogger#post",
  "id": "7706273476706534553",
  "blog": {
    "id": "2399953"
  },
  "published": "2011-08-01T19:58:00.000Z",
  "updated": "2011-08-01T19:58:51.947Z",
  "url": "http://buzz.blogger.com/2011/08/latest-updates-august-1st.html",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553",
  "title": "Latest updates, August 1st",
  "content": "elided for readability",
  "author": {
    "id": "401465483996",
    "displayName": "Brett Wiltshire",
    "url": "http://www.blogger.com/profile/01430672582309320414",
    "image": {
      "url": "http://4.bp.blogspot.com/_YA50adQ-7vQ/S1gfR_6ufpI/AAAAAAAAAAk/1ErJGgRWZDg/S45/brett.png"
    }
  },
  "replies": {
    "totalItems": "0",
    "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553/comments"
  }
}

Searching for a post

You can search for posts from a blog by sending a GET request to the post search URI with the q search query parameter:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/search?q=query terms

Request

GET https://www.googleapis.com/blogger/v3/blogs/3213900/posts/search?q=documentation&key=YOUR-API-KEY

A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post:

{
  "kind": "blogger#postList",
  "nextPageToken": "CgkIChiAj86CpB8QzJTEAQ",
  "prevPageToken": "CgkIChDBq5v24yYQzJTEAQ",
  "items": [
  {
    "kind": "blogger#post",
    "id": "1387873546480002228",
    "blog": {
      "id": "3213900"
    },
    "published": "2012-03-23T01:58:00-07:00",
    "updated": "2012-03-23T01:58:12-07:00",
    "url": "http://code.blogger.com/2012/03/blogger-documentation-has-moved-to.html",
    "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900/posts/1387873546480002228",
    "title": "Blogger Documentation has moved to developers.google.com",
    "content": "content elided for readability",
    "author": {
      "id": "16258312240222542576",
      "displayName": "Brett Morgan",
      "url": "http://www.blogger.com/profile/16258312240222542576",
      "image": {
        "url": "http://img2.blogblog.com/img/b16-rounded.gif"
      }
    },
    "replies": {
      "totalItems": "0",
      "selfLink": "https://www.googleapis.com/blogger/v3/blogs/3213900/posts/1387873546480002228/comments"
    }
  },
  ...
  ]
}

Adding a post

You can add a post for a blog by sending a POST request to the post collection URI with a post JSON body:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/

Request

POST https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/
Authorization: /* OAuth 2.0 token here */
Content-Type: application/json

{
  "kind": "blogger#post",
  "blog": {
    "id": "8070105920543249955"
  },
  "title": "A new post",
  "content": "With <b>exciting</b> content..."
}

You must be authenticated to create a post.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post:

{
 "kind": "blogger#post",
 "id": "6819100329896798058",
 "blog": {
  "id": "8070105920543249955"
 },
 "published": "2012-05-20T20:08:00-07:00",
 "updated": "2012-05-20T20:08:35-07:00",
 "url": "http://brettmorgan-test2.blogspot.com/2012/05/new-post.html",
 "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058",
 "title": "A new post",
 "content": "With <b>exciting</b> content...",
 "author": {
  "id": "16258312240222542576",
  "displayName": "Brett Morgan",
  "url": "http://www.blogger.com/profile/16258312240222542576",
  "image": {
   "url": "http://img2.blogblog.com/img/b16-rounded.gif"
  }
 },
 "replies": {
  "totalItems": "0",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058/comments"
 }
}

Deleting a post

You can delete a post for a blog by sending a DELETE request to the post resource URI:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/postId

Request

Here is an example:

DELETE https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058
Authorization: /* OAuth 2.0 token here */

You must be authenticated to delete a post.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code.

Retrieving a post by its path

You can retrieve a post from a blog by sending a GET request to the posts bypath URI with a path parameter. The URI for a posts by path request has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/bypath?path=post-path

Request

https://www.googleapis.com/blogger/v3/blogs/2399953/posts/bypath?path=/2011/08/latest-updates-august-1st.html&key=YOUR-API-KEY

A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post:

{
  "kind": "blogger#post",
  "id": "7706273476706534553",
  "blog": {
    "id": "2399953"
  },
  "published": "2011-08-01T19:58:00.000Z",
  "updated": "2011-08-01T19:58:51.947Z",
  "url": "http://buzz.blogger.com/2011/08/latest-updates-august-1st.html",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553",
  "title": "Latest updates, August 1st",
  "content": "elided for readability",
  "author": {
    "id": "401465483996",
    "displayName": "Brett Wiltshire",
    "url": "http://www.blogger.com/profile/01430672582309320414",
    "image": {
      "url": "http://4.bp.blogspot.com/_YA50adQ-7vQ/S1gfR_6ufpI/AAAAAAAAAAk/1ErJGgRWZDg/S45/brett.png"
    }
  },
  "replies": {
    "totalItems": "0",
    "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553/comments"
  }
}

Updating a post

You can update a post for a blog by sending a PUT request to the post resource URI with a post JSON body:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/postId

Request

PUT https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/3445355871727114160
Authorization: /* OAuth 2.0 token here */
Content-Type: application/json

{
 "kind": "blogger#post",
 "id": "3445355871727114160",
 "blog": {
  "id": "8070105920543249955"
 },
 "url": "http://brettmorgan-test2.blogspot.com/2012/05/new-post_20.html",
 "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/3445355871727114160",
 "title": "An updated post",
 "content": "With really <b>exciting</b> content..."
}

You must be authenticated to update a post.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post:

{
 "kind": "blogger#post",
 "id": "6819100329896798058",
 "blog": {
  "id": "8070105920543249955"
 },
 "published": "2012-05-20T20:08:00-07:00",
 "updated": "2012-05-20T20:08:35-07:00",
 "url": "http://brettmorgan-test2.blogspot.com/2012/05/new-post.html",
 "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058",
 "title": "An updated post",
 "content": "With really <b>exciting</b> content...",
 "author": {
  "id": "16258312240222542576",
  "displayName": "Brett Morgan",
  "url": "http://www.blogger.com/profile/16258312240222542576",
  "image": {
   "url": "http://img2.blogblog.com/img/b16-rounded.gif"
  }
 },
 "replies": {
  "totalItems": "0",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058/comments"
 }
}

Updating A post with patch semantics

You can update a post with patch semantics by sending a PATCH request to the post resource URI with a post JSON body:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/postId

Request

Here is an example:

PATCH https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/3445355871727114160
Authorization: /* OAuth 2.0 token here */
Content-Type: application/json

{
 "content": "With absolutely <b>fabulous</b> content..."
}

You must be authenticated to update a post.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the contents of the post:

{
 "kind": "blogger#post",
 "id": "6819100329896798058",
 "blog": {
  "id": "8070105920543249955"
 },
 "published": "2012-05-20T20:08:00-07:00",
 "updated": "2012-05-20T20:08:35-07:00",
 "url": "http://brettmorgan-test2.blogspot.com/2012/05/new-post.html",
 "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058",
 "title": "An updated post",
 "content": "With absolutely <b>fabulous</b> content...",
 "author": {
  "id": "16258312240222542576",
  "displayName": "Brett Morgan",
  "url": "http://www.blogger.com/profile/16258312240222542576",
  "image": {
   "url": "http://img2.blogblog.com/img/b16-rounded.gif"
  }
 },
 "replies": {
  "totalItems": "0",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/8070105920543249955/posts/6819100329896798058/comments"
 }
}

Working with comments

Retrieving comments for a post

You can retrieve a list of comments for a post by sending a GET request to the comments collection URI. The URI for a comments collection has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/postId/comments

Request

GET https://www.googleapis.com/blogger/v3/blogs/2399953/posts/6069922188027612413/comments?key=YOUR-API-KEY

"A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the list of comments:

{
  "kind": "blogger#commentList",
  "nextPageToken": "CgkIFBDwjvDXlyYQ0b2SARj9mZe9n8KsnlQ",
  "prevPageToken": "CgkIFBisvMGRlyYQ0b2SARj9mZe9n8KsnlQ",
  "items": [
    {
       "kind": "blogger#comment",
       "id": "9200761938824362519",
       "post": {
         "id": "6069922188027612413"
       },
       "blog": {
         "id": "2399953"
       },
       "published": "2011-07-28T19:19:57.740Z",
       "updated": "2011-07-28T21:29:42.015Z",
       "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/6069922188027612413/comments/9200761938824362519",
       "content": "elided",
       "author": {
         "id": "530579030283",
         "displayName": "elided",
         "url": "elided",
         "image": {
           "url": "elided"
         }
       }
    },
    {
      "kind": "blogger#comment",
      "id": "400101178920857170",
      elided for readability
    }
  ]
}

Retrieving a specific comment

You can retrieve a specific comment from a post by sending a GET request to the comments resource URI. The URI for a comments resource has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/posts/postId/comments/commentId

Request

GET https://www.googleapis.com/blogger/v3/blogs/2399953/posts/6069922188027612413/comments/9200761938824362519?key=YOUR-API-KEY

"A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the comment data:

{
  "kind": "blogger#comment",
  "id": "9200761938824362519",
  "post": {
    "id": "6069922188027612413"
  },
  "blog": {
    "id": "2399953"
  },
  "published": "2011-07-28T19:19:57.740Z",
  "updated": "2011-07-28T21:29:42.015Z",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/2399953/posts/6069922188027612413/comments/9200761938824362519",
  "content": "elided",
  "author": {
    "id": "530579030283",
    "displayName": "elided",
    "url": "elided",
    "image": {
      "url": "elided"
    }
  }
}

Working with pages

Retrieving pages for a blog

You can retrieve a list of pages for a blog by sending a GET request to the pages collection URI. The URI for a pages collection has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/pages

Request

GET https://www.googleapis.com/blogger/v3/blogs/4967929378133675647/pages?key=YOUR-API-KEY

"A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the list of pages:

{
  "kind": "blogger#pageList",
  "items": [
    {
      "kind": "blogger#page",
      "id": "273541696466681878",
      "blog": {
        "id": "4967929378133675647"
      },
      "published": "2011-07-14T16:16:00.000Z",
      "updated": "2011-07-14T16:16:23.602Z",
      "url": "http://brettmorgan-test-blawg.blogspot.com/p/static-content.html",
      "selfLink": "https://www.googleapis.com/blogger/v3/blogs/4967929378133675647/pages/273541696466681878",
      "title": "Static Content",
      "content": "elided for readability",
      "author": {
        "id": "901569848744",
        "displayName": "brett",
        "url": "http://www.blogger.com/profile/16258312240222542576",
        "image": {
          "url": "http://img2.blogblog.com/img/b16-rounded.gif"
        }
      }
    }
  ]
}

Retrieving a specific page

You can retrieve a specific page from a blog by sending a GET request to the pages resource URI. The URI for a pages Resource has the following format:

https://www.googleapis.com/blogger/v3/blogs/blogId/pages/pageId

Request

GET https://www.googleapis.com/blogger/v3/blogs/4967929378133675647/pages/273541696466681878?key=YOUR-API-KEY

"A user does not need to be authenticated to retrieve a public blog. The application does not need to include Authorization HTTP header for a public blog request; however, you do need to provide the API key.

Blogger also has private blogs, which require authentication.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and the page data:

{
  "kind": "blogger#page",
  "id": "273541696466681878",
  "blog": {
    "id": "4967929378133675647"
  },
  "published": "2011-07-14T16:16:00.000Z",
  "updated": "2011-07-14T16:16:23.602Z",
  "url": "http://brettmorgan-test-blawg.blogspot.com/p/static-content.html",
  "selfLink": "https://www.googleapis.com/blogger/v3/blogs/4967929378133675647/pages/273541696466681878",
  "title": "Static Content",
  "content": "elided for readability",
  "author": {
    "id": "901569848744",
    "displayName": "brett",
    "url": "http://www.blogger.com/profile/16258312240222542576",
    "image": {
      "url": "http://img2.blogblog.com/img/b16-rounded.gif"
    }
  }
}

Working with users

Retrieving a user

You can retrieve a user's information by sending an HTTP GET request to the users resource URI:

https://www.googleapis.com/blogger/v3/users/userId

Request

GET https://www.googleapis.com/blogger/v3/users/self
Authorization: /* OAuth 2.0 token here */

Note: The user must be authenticated to list their own information, so you must provide the Authorization HTTP header with the GET request.

Response

If the request succeeds, the server responds with an HTTP 200 OK status code and a link to a list of the user's blogs:

{
  "kind": "blogger#user",
  "id": "901569848744",
  "selfLink": "https://www.googleapis.com/blogger/v3/users/901569848744",
  "blogs": {
    "selfLink": "https://www.googleapis.com/blogger/v3/users/901569848744/blogs"
  }
}

Standard query parameters

The following query parameters can be used with all methods and all resources in the Blogger APIs.

Query parameters that apply to all Blogger APIs operations are shown in the table below.

Notes (on API keys and auth tokens):

  1. The key parameter is required with every request, unless you provide an OAuth 2.0 token with the request.
  2. You must send an authorization token with every request that is marked (AUTHENTICATED). OAuth 2.0 is the preferred authorization protocol.
  3. You can provide an OAuth 2.0 token with any request in one of two ways:
    • Using the access_token query parameter like this: ?access_token=oauth2-token
    • Using the HTTP Authorization header like this: Authorization: Bearer oauth2-token

All parameters are optional except where noted.

Parameter Meaning Notes
access_token OAuth 2.0 token for the current user.
callback Callback function.
  • Name of the JavaScript callback function that handles the response.
  • Used in JavaScript JSON-P requests.
fields Selector specifying a subset of fields to include in the response.
  • For more information, see the partial response section in the Performance Tips document.
  • Use for better performance.
key API key. (REQUIRED*)
  • *Required unless you provide an OAuth 2.0 token.
  • Your API key identifies your project and provides you with API access, quota, and reports.
  • Obtain your project's API key from the Google Developers Console.
prettyPrint

Returns response with indentations and line breaks.

  • Returns the response in a human-readable format if true.
  • Default value: true.
  • When this is false, it can reduce the response payload size, which might lead to better performance in some environments.
quotaUser Alternative to userIp.
  • Lets you enforce per-user quotas from a server-side application even in cases when the user's IP address is unknown. This can occur, for example, with applications that run cron jobs on App Engine on a user's behalf.
  • You can choose any arbitrary string that uniquely identifies a user, but it is limited to 40 characters.
  • Overrides userIp if both are provided.
  • Learn more about capping usage.
userIp IP address of the end user for whom the API call is being made.
  • Lets you enforce per-user quotas when calling the API from a server-side application.
  • Learn more about capping usage.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.