GS2-Friend Transaction Actions

Specification of verify/consume/acquire transaction actions

Acquire Action

Gs2Friend:UpdateProfileByUserId

Update profile by specifying a user ID

Updates the specified user’s profile with three distinct visibility levels (server-side operation):

  • publicProfile: visible to all users
  • followerProfile: visible only to followers
  • friendProfile: visible only to friends

Supports quantity specification: NO

Whether the action is reversible: NO

Type Condition Required Default Value Limits Description
namespaceName string
~ 128 chars Namespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userId string
~ 128 chars User ID
Specify #{userId} to substitute the currently logged-in user’s ID.
publicProfile string ~ 1024 chars Public profile
Profile information visible to all players regardless of relationship. Typically used for display names, avatars, or other publicly shareable information.
followerProfile string ~ 1024 chars Profile for followers
Profile information visible only to players who follow this user. Can contain more detailed information than the public profile, such as gameplay statistics or status messages.
friendProfile string ~ 1024 chars Profile for friends
Profile information visible only to players who have an established mutual friend relationship. The most private profile level, suitable for sharing personal information like contact details or private messages.
timeOffsetToken string ~ 1024 chars Time offset token
{
    "action": "Gs2Friend:UpdateProfileByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "publicProfile": "[string]Public profile",
        "followerProfile": "[string]Profile for followers",
        "friendProfile": "[string]Profile for friends",
        "timeOffsetToken": "[string]Time offset token"
    }
}
action: Gs2Friend:UpdateProfileByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  publicProfile: "[string]Public profile"
  followerProfile: "[string]Profile for followers"
  friendProfile: "[string]Profile for friends"
  timeOffsetToken: "[string]Time offset token"
transaction.service("friend").acquire.update_profile_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    publicProfile="[string]Public profile",
    followerProfile="[string]Profile for followers",
    friendProfile="[string]Profile for friends",
    timeOffsetToken="[string]Time offset token",
})