logo

getMyProfiles

Retrieves your own API's profile — its name, photo and id.
💡 Useful right after connecting, to confirm which bot the token belongs to.

Request

method is "getMyProfiles".
Field
Type
Required
Description
reference
String
Optional
Your id for this request. Echoed back in the response.
No other fields — the API is identified by the authenticated session.

Preconditions

None. An API can always read its own profile.

Response

myProfile

Field
Type
Returned
Description
method
String
Yes
"myProfile"
user
Yes
Your API's own user record.
reference
String
Optional
Echoed from the request.

SDKs

SDK
Call
Callback
Java
api.getMyProfiles(reference);
onMyProfile(User user)
JavaScript
api.getMyProfiles(reference);
onMyProfile(user)
Python
napi.get_my_profiles(reference=reference)
on_my_profile(self, user)

Example

Request

json
{ "method": "getMyProfiles", "reference": "123456789" }
java
api.getMyProfiles("123456789");
javascript
api.getMyProfiles("123456789");
python
napi.get_my_profiles(reference="123456789")

Response

json
{ "method": "myProfile", "reference": "123456789", "user": { "id": "90091783822039252", "name": "My First API", "profile": "Other", "status": "", "version": "0eb1", "photo": { "id": "V_0eb1_90091783822039252_0_HXcQqV3KVZ.jpg", "width": 256, "height": 256, "thumbnail": { "id": "V_0eb1_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