logo

setMyProfile

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

json
{ "method": "setMyProfile", "app_id": "90090684293000559", "reference": "132456789", "user": { "name": "First API Update", "status": "Online", "photo": { "id": "V_0eb1_90091783822039252_0_HXcQqV3KVZ.jpg" } } }
java
User user = new User(); user.setName("First API Update"); api.setMyProfile(user, "132456789");
javascript
let user = new User(); user.name = "First API Update"; api.setMyProfile(user, "132456789");
python
user = User() user.name = "First API Update" napi.set_my_profile(user=user, reference="132456789")

Response

json
{ "method": "myProfile", "reference": "132456789", "user": { "id": "90091783822039252", "name": "First API Update", "profile": "Other", "status": "Online", "version": "0twD", "photo": { "id": "V_0twD_90091783822039252_0_HXcQqV3KVZ.jpg", "width": 256, "height": 256, "thumbnail": { "id": "V_0twD_90091783822039252_0_HXcQqV3KVZ.jpg.thumb.jpg", "width": 120, "height": 120 } }, "image": "/9j/4AAQSkZJRgABAgAAAQABAAD…" } }
💡 image is the profile photo inlined as base64 and can be very large. It is truncated above.

Powered by Notaku