> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Friend Transaction Actions

Specification of verify/consume/acquire transaction actions






## Acquire Action



### Gs2Friend:UpdateProfileByUserId

Update profile by 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

**Quantity specification supported: NO**

**Reversible action: NO**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| publicProfile | string |  | |  |  ~ 1024 chars | Public profile<br>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<br>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<br>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 |




**JSON**
```json
{
    "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"
    }
}
```

**YAML**
```yaml

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"
```

**GS2-Script**
```lua

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",
})
```


---



