# Some question about use Get a user API

**URL:** <https://forum.mattermost.com/t/some-question-about-use-get-a-user-api/10626>\
**Category:** Troubleshooting\
**Created:** [October 27, 2020, 11:57am UTC](https://forum.mattermost.com/t/some-question-about-use-get-a-user-api/10626 "2020-10-27T11:57:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![syuancheng](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@syuancheng](https://forum.mattermost.com/u/syuancheng)\
**Post date:** [October 27, 2020, 11:57am UTC](https://forum.mattermost.com/t/some-question-about-use-get-a-user-api/10626/1 "2020-10-27T11:57:50Z")

</div>

I need to use get a user api ([Mattermost API Reference](https://api.mattermost.com/#tag/users/paths/~1users~1%7Buser_id%7D~1image~1default/get)), I create a local mattermost server by my own email, I get the successful result when I use this api. but our company mattermost is use google to login, so there’s no login by username and password. but email and password is necessary when use this api. So is there any other way to solve this problem that I have?

```
   Client := model.NewAPIv4Client("https://your-mattermost-url.com")
   Client.Login("email@domain.com", "Password1")

```
