users resource endpoint

URL: /users/<id>.<format>

This noun is the root of endpoints containing much of the available information about a user.

The id parameter of this noun must be one of the following:

  • the urlId from a User object, if you already know the canonical urlId for the user you wish to retrieve, it can be included literally.
  • the preferredUsername of a User, if you know a user's preferred username (or "profile alias") then it can be used to select the corresponding user.
  • the literal string "@self", to select the user corresponding to the oauth token being used in the request. (supported only when authenticating as a user)

If you make a request using an identifier other than the canonical urlId, the server will issue a redirect to the canonical form. If, in the response, the Location and Content-Location headers point to the same URL then it is acceptable to decline to follow the redirect and use the provided body as the response payload.

Implementations that do follow the redirect must be sure to re-calculate the OAuth signature to reflect the new request URL. Implementations should be prepared also to accept a plain 200 OK response with a Content-Location header since it is likely that this behavior will be changed in future to avoid the overhead of following the redirect.

Supported Methods

GET Get basic information about the selected user.

Resource Type

This endpoint returns an object of type User.

avatarLink (ImageLink)
A link to an image representing this user.
displayName (string)
The user's chosen display name.
email (string)
(Deprecated) The user's email address. This property is only provided for authenticated requests if the user has shared it with the authenticated application, and the authenticated user is allowed to view it (as with administrators of groups the user has joined). In all other cases, this property is omitted.
gender (string)
(Deprecated) The user's gender, as they provided it. This property is only provided for authenticated requests if the user has shared it with the authenticated application, and the authenticated user is allowed to view it (as with administrators of groups the user has joined). In all other cases, this property is omitted.
id (string)
A URI that serves as a globally unique identifier for the object.
interests (array<string>)
(Deprecated) A list of interests provided by the user and displayed on the user's profile page. Use the interests property of the UserProfile object, which can be retrieved from the /users/<id>/profile endpoint.
location (string)
(Deprecated) The user's location, as a free-form string provided by them. Use the the location property of the related UserProfile object, which can be retrieved from the /users/<id>/profile endpoint.
objectType (string)
The keyword identifying the type of object this is. For a User object, objectType will be User.
objectTypes (set<string>)
(Deprecated) An array of object type identifier URIs.
preferredUsername (string)
The name the user has chosen for use in the URL of their TypePad profile page. This property can be used to select this user in URLs, although it is not a persistent key, as the user can change it at any time.
profilePageUrl (string)
The URL of the user's TypePad profile page.
urlId (string)
A string containing the canonical identifier that can be used to identify this object in URLs. This can be used to recognise where the same user is returned in response to different requests, and as a mapping key for an application's local data store.

Client Library Methods for PHP

Get basic information about the selected user.
$tp->users->get(array(

    # Required Parameters
    "id" => $id,

))

Property Endpoints

This endpoint has the following property endpoints:

blogs Get a list of blogs that the selected user has access to.
favorites Get a list of favorites that were listed by the selected user.
memberships Get a list of relationships that the selected user has with groups.
profile Get a more extensive set of user properties that can be used to build a user profile page.
relationships Get a list of relationships that the selected user has with other users, and that other users have with the selected user.
elsewhere-accounts Get a list of elsewhere accounts for the selected user.
badges Get a list of badges that the selected user has won.
events Get a list of events describing actions that the selected user performed.
notifications Get a list of events describing actions by users that the selected user is following.

Action Endpoints

This endpoint has the following action endpoints:

send-email (Unimplemented) Send an email to the selected user.
change-basic-details Change the basic account details associated with the selected user.

Example Request

GET /users/6p012877b13de7970c.json HTTP/1.1
Host: api.typepad.com

HTTP/1.0 200 OK
Content-type: application/json
Content-length: 672

{
   "urlId": "6p012877b13de7970c",
   "location": null,
   "interests": [],
   "objectTypes": [
      "tag:api.typepad.com,2009:User"
   ],
   "profilePageUrl": "http://profile.typepad.com/loblawatlaw",
   "aboutMe": null,
   "objectType": "User",
   "preferredUsername": "loblawatlaw",
   "id": "tag:api.typepad.com,2009:6p012877b13de7970c",
   "avatarLink": {
      "width": 250,
      "urlTemplate": "http://static.typepad.com/.shared:ve70b533:typepad:en_us/default-userpics/11-{spec}.gif",
      "url": "http://static.typepad.com/.shared:ve70b533:typepad:en_us/default-userpics/11-250si.gif",
      "height": 250
   },
   "displayName": "Bob Loblaw"
}