# \[SOLVED\] Is there a way to view user's profile picture from the API using "username" and not "GUID"?

**URL:** https://forum.mattermost.com/t/solved-is-there-a-way-to-view-users-profile-picture-from-the-api-using-username-and-not-guid/3932
**Category:** Troubleshooting
**Created:** [October 9, 2017, 4:30am UTC](https://forum.mattermost.com/t/solved-is-there-a-way-to-view-users-profile-picture-from-the-api-using-username-and-not-guid/3932 "2017-10-09T04:30:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![joseph.fabales](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@joseph.fabales](https://forum.mattermost.com/u/joseph.fabales)
#### Post date: [October 9, 2017, 4:30am UTC](https://forum.mattermost.com/t/solved-is-there-a-way-to-view-users-profile-picture-from-the-api-using-username-and-not-guid/3932/1 "2017-10-09T04:30:49Z")

</div>

Hi,

I am configuring integration between xmpp and mattermost using matterbridge and I would like to be able to set the IconURL to the profile image of the user in mattermost. As I understand, the API should be like this:  
[https://mattermost.example.com/api/v4/users/GUID/image](https://mattermost.example.com/api/v4/users/GUID/image) but matterbridge does not recognize GUID, it only recognizes NICK, which is the username for both xmpp and mattermost, so is there a way to query the profile image using the username and not guid? Something like this?  
[https://mattermost.example.com/api/v4/users/{NICK}/image](https://mattermost.example.com/api/v4/users/%7BNICK%7D/image)

Thanks in advance,  
Joseph

---

<div class="post-metadata">

### Author: ![elias](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@elias](https://forum.mattermost.com/u/elias)
#### Post date: [October 11, 2017, 11:51am UTC](https://forum.mattermost.com/t/solved-is-there-a-way-to-view-users-profile-picture-from-the-api-using-username-and-not-guid/3932/2 "2017-10-11T11:51:00Z")

</div>

Hi @joseph.fabales

There’s no API to get the image using the username but there is [Get a user by username](https://api.mattermost.com/v4/#tag/users%2Fpaths%2F~1users~1username~1%7Busername%7D%2Fget) that can be used to get the GUID if you need it.

You can see the whole API documentation [here](https://api.mattermost.com)

---

<div class="post-metadata">

### Author: ![joseph.fabales](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@joseph.fabales](https://forum.mattermost.com/u/joseph.fabales)
#### Post date: [October 12, 2017, 3:41am UTC](https://forum.mattermost.com/t/solved-is-there-a-way-to-view-users-profile-picture-from-the-api-using-username-and-not-guid/3932/3 "2017-10-12T03:41:59Z")

</div>

Hi Elias,

Thank you for your reply. Yes I saw that API as well and from there figure out the GUID of the user but I’m afraid matterbridge cannot programatically do that. Anyway, thanks again.
