logo
Use this method to get a userโ€™s profile. On success, the User is returned.
Field
Type
Required
Description
method
String
Yes
"getUser"
app_id
String
Yes
Unique identifier for App.
user_id
String
Yes
Unique identifier for this User or Bot.
reference
String
Optional
Unique identifier for the request. This reference will be echoed in the response.

Preconditions for API Functionality

The following table outlines the preconditions that must be met for the API to function correctly. Failure to meet these conditions may result in errors or unexpected behavior.
Condition
API must have โ€œManage Usersโ€ permission
The API needs โ€œManage Usersโ€ permission to manage chats within the app.

Response

userDetails

โœ… On success, the userDetails method is returned with an echo of the user object.
Field
Type
Returned
Description
method
String
Yes
"userDetails"
app_id
String
Yes
Unique identifier for App.
user
Yes
User Object.
reference
String
Optional
Unique identifier echoed from the request.

SDK Mapping โ€” getUser

SDK
Request Method
Response Callback
Java
api.getUser(userId, appId, reference);
onUserDetails(User user, Long appId)
JavaScript
api.getUser( user_id=user_id, app_id=app_id, reference);
onUserDetails(user, obj.app_id)
Python
napi.get_user( userId, appId, reference=reference )
on_user_details(self, user, app_id)

Example

Requests

json
{ "method": "getUser", "app_id": "90090684293000559", "user_id": "90089584781491899", "reference": "132456789" }
java
api.getUser("90089584789572153", Long.valueOf("90090684293000559"), null);
javascript
api.getUser("90089584789572153", "90090684293000559", null);
python
napi.get_user("90089584789572153", "90090684293000559", None)

Response

json
{ "method": "userDetails", "user": { "image": "\/9j\/4AAQSkZJRgABAQAASABIAAD\/4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAKgAgAEAAAAAQAAAFygAwAEAAAAAQAAAFwAAAAA\/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv\/AABEIAFwAXAMBIgACEQEDEQH\/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv\/xAC1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GB\/XHapjZTjqB+dMDNoq+1vIjbHwDgnr6DPaq9AEFFT0UAQUVPRQBBRU9FAEFJjNWKifrQB\/\/9TilJXlTj6U4ySE5LHP1qa0hWeTy3JA2sePYZqFFDKxP8Iz+oFMBuT60lT28SzSbGyBtY8ewJqCgAooooAKKKKACiiigAqJ+tS1E\/WgD\/\/Z", "name": "Donald Trump", "photo": { "thumbnail": { "width": 120, "id": "V_0F9o_90089584766094863_0_g0LwjLXs6x.jpg.thumb.jpg", "height": 120 }, "width": 256, "id": "V_0F9o_90089584766094863_0_g0LwjLXs6x.jpg", "height": 256 }, "id": "90089584766094863", "is_bot": false, "version": "0F9o", "status": "" } }

Powered by Notaku