Users

Learn about the user class of the Blogger API.

Overview

A user, also referred to as a Blogger user, represents the person who writes blogs. A user is the owner and the author of all the blog posts and pages created from his/her blogger account.

User properties

The table below shows the list of user class properties.

Parameter

Type

Description

kind

string

The type of object.

Value: "blogger#user"

Note: This value is fixed.

id

string

The ID of the user.

created

datetime

The user profile's date of creation.

Format: yyyy-mm-dd

url

string

The published link of the user profile.

selfLink

string

The Blogger API URL of the user profile.

blogs

object

The object that contains the user's blogs.

blogs.selfLink

string

The Blogger API URL of the user's blogs collection.

displayName

string

The name of the user.

about

string

The profile summary of the user.

locale

object

The object that contains the locale information of the user.

locale.language

string

The Language setting of the user.

locale.country

string

The country setting of the user.

locale.variant

string

The language variant setting of the user.

Get user ID

Step 1: Head over to the Blogger dashboard.

Step 2: From the navigation panel on the left, click the "View blog" button. This will direct you to your published blog site.

Step 3: In the navigation panel, click on the "VISIT PROFILE" button. This will direct you to your user profile page.

Step 4: Look at the URL of the webpage in the address bar of the browser. The number at the end of the URL is your USER_ID.

Save this ID somewhere—we'll need it throughout this course.

Get user information

We can get user information by making a GET request to the following endpoint:

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

This endpoint requires the USER_ID.

Request parameters

Parameter

Type

Category

Description

USER_ID

string

required

The ID of the user to retrieve.

Allowable values: "self" or current user ID

Sample code

Click the "Edit" button in the widget below. Enter the value for the required parameter USER_ID and click the "Save" button. Then, click the "Run" button to see the output.

Press + to interact
url = 'https://blogger.googleapis.com/v3/users/{{USER_ID}}'
response = requests.get(url, headers=headers)
printResponse(response)

The above code displays the complete user object corresponding to the given USER_ID. The response object contains all the parameters given in the user properties table above. An appropriate error message will be displayed if the API call fails.