Updates your own API's profile — its display name, photo or status.
💡 Send the whole
userobject. Fields you omit are left unchanged.
method is "setMyProfile".
| Field | Type | Required | Description |
|---|---|---|---|
user |
User | Yes | The profile to apply to your API. |
app_id |
String | Optional | The app the API belongs to. |
reference |
String | Optional | Your id for this request. Echoed back in the response. |
user| Field | Type | Description |
|---|---|---|
name |
String | Display name of the API. |
status |
String | Status text, e.g. "Online". |
photo |
Object | { "id": "<media_id>" } — upload the image first, then reference it by id. |
None. An API can always update its own profile.
| Field | Type | Returned | Description |
|---|---|---|---|
method |
String | Yes | "myProfile" |
user |
User | Yes | The profile as it now stands, with a new version. |
reference |
String | Optional | Echoed from the request. |
| SDK | Call | Callback |
|---|---|---|
| Java | api.setMyProfile(user, reference); |
onMyProfile(User user) |
| JavaScript | api.setMyProfile(user, reference); |
onMyProfile(user) |
| Python | napi.set_my_profile(user=user, reference=reference) |
on_my_profile(self, user) |
{
"method": "setMyProfile",
"app_id": "90090684293000559",
"reference": "132456789",
"user": {
"name": "First API Update",
"status": "Online",
"photo": {
"id": "V_0eb1_90091783822039252_0_HXcQqV3KVZ.jpg"
}
}
}
User user = new User();
user.setName("First API Update");
api.setMyProfile(user, "132456789");
let user = new User();
user.name = "First API Update";
api.setMyProfile(user, "132456789");