GS2-Friend Transaction Actions

Specification of verify/consume/acquire transaction actions

AcquireAction

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

TypeConditionRequiredDefaultValue LimitsDescription
namespaceNamestring
~ 128 charsNamespace name
Namespace-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
userIdstring
~ 128 charsUser ID
Set #{userId} to replace the currently logged in user ID.
publicProfilestring~ 1024 charsPublic profile
Profile information visible to all players regardless of relationship. Typically used for display names, avatars, or other publicly shareable information.
followerProfilestring~ 1024 charsProfile 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.
friendProfilestring~ 1024 charsProfile 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.
timeOffsetTokenstring~ 1024 charsTime 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",
})