How can i get user avatar using api in ejabbred?

82 views Asked by At

I need to get a user profile image OR avatar using an API from EJABBRED ? I am using PHP for API. How can i accomplish that?

1

There are 1 answers

0
Badlop On BEST ANSWER

It depends on how you store the avatar, as there are several ways in Jabber. For example, Tkabber can store the avatar in the user vcard. In this case, you can use the get_vcard2 command. For example:

$ ejabberdctl get_vcard2 user1 localhost PHOTO BINVAL R0lGODdhcAAcAIABAAAAAP///ywAAAAAcAAcAAACb4SPqcvtD6OctNqLadi8+w+G4kiW5skh6Mq27pse8EzXrWrn+h7g/A9c+YLE4mdoTBKRyuaO6YzSoNLqTWbNvqjarojrDXfAYjG57D2jteq1te2WwuPOOV1pvxvz+iW2H8YH+JNRaHiImKi4yAhQAAA7