Skip to main content

Activity

Overview​

Activity is an API which records a user’s activity history. The recorded activity is displayed in time series on the user’s friends’ My Page.

warning

This API is included for the sake of maintaining compatibility with platforms for feature phones in Japan. Users’ activities are not actually displayed.


Activity Object Fields​

The following is a list of Activity object fields which are Mobage open platform-compliant.

ValueDescriptionTypeNamespaceNotes
titleTitle of Activityxs:stringhttp://ns.opensocial.org/2008/opensocialDo not allow unlimited user input in this field.
urlURL which Activity references (on PCs)xs:stringhttp://ns.opensocial.org/2008/opensocialDefault is application top url
touchUrlURL which Activity references (on smartphone Web browsers)xs:stringhttp://ns.dena.jp/mbga/gameapi/v1If omitted, default is application top url
bodyBody of Activityxs:stringhttp://ns.opensocial.org/2008/opensocialDo not allow unlimited user input in this field.
mediaItemsImages relating to the Activityxs:MediaItem (unbounded)http://ns.opensocial.org/2008/opensocialA maximum of three of the MediaItem type may be registered, and are displayed at 75x75 pixels on PC versions.

MediaItem Object Fields​

ValueDescriptionTypeNamespaceNotes
urlURL of imagexs:stringhttp://ns.opensocial.org/2008/opensocial–
typeType of MediaItemxs:stringhttp://ns.opensocial.org/2008/opensocialOnly 'image' type may be specified in this field.
mime_typeMimeType of MediaItemxs:stringhttp://ns.opensocial.org/2008/opensocial'image/gif', 'image/jpeg', 'image/png'

API Request​

HTTP Method​

Proxy Model

  • POST

Trusted Model


Endpoint URL​

  • Sandbox Environment

    http://sb.sp.app.mbga.jp/api/restful/v1/activities/{guid}/{selector}/{appid}
  • Production Environment

    http://sp.app.mbga.jp/api/restful/v1/activities/{guid}/{selector}/{appid}

URI Template Parameters​

guid​

Only "@me" may be designated in the guid parameter.

ValueDescriptionRemarks
@meviewer guidRequired
selector​

Only "@self" may be designated in the selector parameter.

ValueDescriptionNotes
@selfA collection resource relating to the Activity information of the user which is specified with the guid parameterRemarks
appid​

Only "@app" may be designated in the appid parameter.

ValueDescriptionRemarks
@appApplication ID of viewer being executedRequired

Query Parameters​

None.


OAuth Signed Request​

This function allows secure transfers of data using OAuth Request Body Hash.
 
A xoauth_requestor_id must be included as either an authorized header or a query parameter.
The following values are designated by mode:
 
Proxy Mode
guid of viewer (value of opensocial_viewer_id sent from the Gadget Server)

API Responses​

API response codes are selected from the following list:

Request HTTP MethodResponse CodeResponse MessageDescription
POST202AcceptedActivity-generating request correctly received
POST400Bad RequestBad request data
POST401UnauthorizedOAuth authorization failure
POST403ForbiddenSignifiies access not allowed for reasons other than authorization failure
POST405Method Not AllowedMethod not allowed
POST500Internal Server ErrorFailure caused by problem with API
POST503Service UnavailableSignifies POSTing more than the allowed Activity for a given user

Notes​

  • HTML tags may not be included in title or body segments.

  • Do not allow users to freely enter title or body inputs.

  • Limit the title to a maximum of 42 single-byte or 21 double-byte characters.

    • Timestamp and the short game name will be in the header of the actual title display.
  • Limit the body to a maximum of 280 single-byte or 140 double-byte characters.

  • Limit Activity recording for a given user to one per minute. The API will return a 503 Service Unavailable message if requests exceeding the limit are sent.

  • Sending Activity using the Activity API has a priority of LOW.

    • At LOW priority, the Activity will be displayed only for the subgroup of friends who have the application installed.
    • At LOW priority, the Activity will not be displayed at the top of the user’s My Page, but only in the "See More" section of the "Friends’ Game Status".
    • If you want to send Activity at HIGH priority, use the Activity Service and not the Activity API.
  • When specifying multiple mediaItems in series, only the first image in the series will be displayed on mobile devices.

  • The Activity API will return a 403 response code if the user does not have the application in question installed.
     


OpenSocial RESTful Protocol Specification v0.9 - 7.3 Activity
XML Schema Part 2: Datatypes Second Edition
URI Template draft-gregorio-uritemplate-03
OAuth Request Body Hash 1.0 Draft 4

Revision History​

  • 03/01/2013
    • Initial release.
  • Overview
  • Activity Object Fields
  • MediaItem Object Fields
  • API Request
    • HTTP Method
    • Endpoint URL
    • Query Parameters
    • OAuth Signed Request
  • API Responses
  • Notes
  • Revision History