Updates your own API's profile — its display name, photo or status.

💡 Send the whole user object. Fields you omit are left unchanged.


Request

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.

Commonly set fields inside 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.

Preconditions

None. An API can always update its own profile.

Response

myProfile

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.

SDKs

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)

Example

Request

{
  "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");