# How to get Username using user\_id

**URL:** https://community.shiphero.com/t/how-to-get-username-using-user-id/1364
**Category:** GraphQL API
**Created:** [June 11, 2021, 7:07am UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364 "2021-06-11T07:07:04Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![supritha](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@supritha](https://community.shiphero.com/u/supritha)
#### Post date: [June 11, 2021, 7:07am UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/1 "2021-06-11T07:07:04Z")

</div>

Hi,

I need to fetch the username by using user\_id.  
I am getting user\_id from the inventory log.

query {  
inventory\_changes(date\_from: “2021-05-30”) {  
request\_id  
complexity  
data {  
edges {  
node {  
user\_id  
account\_id  
warehouse\_id  
sku  
previous\_on\_hand  
change\_in\_on\_hand  
reason  
cycle\_counted  
location\_id  
created\_at  
}  
}  
}  
}  
}

How to get the username(Inventory Changed By) using user\_id.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)
#### Post date: [June 11, 2021, 2:59pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/2 "2021-06-11T14:59:03Z")

</div>

Hi @supritha ,  
What is the request-id that is returned so I can take a closer look?

---

<div class="post-metadata">

### Author: ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)
#### Post date: [June 11, 2021, 3:36pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/3 "2021-06-11T15:36:52Z")

</div>

This query will give the user name:

```auto
query {
  picks_per_day(date_from: "2021-04-30") {
    request_id
    complexity
    data {
      edges {
        node {
          id
          user_id
          tote_id
          line_item_id
          location_id
          order_id
          order_number
          user_first_name
          user_last_name
          inventory_bin
          sku
          quantity
          picked_quantity
          pick_type
          barcode_scanned
          created_at
        }
        cursor
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![supritha](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@supritha](https://community.shiphero.com/u/supritha)
#### Post date: [June 11, 2021, 4:37pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/4 "2021-06-11T16:37:03Z")

</div>

Thanks, @Theresa!

Yes, I got a user name using the mentioned Query.

---

<div class="post-metadata">

### Author: ![supritha](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@supritha](https://community.shiphero.com/u/supritha)
#### Post date: [June 14, 2021, 11:30am UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/5 "2021-06-14T11:30:13Z")

</div>

Hi,

Is there any case where user\_id returned from inventory\_changes API is not in packs\_per\_day to fetch user\_first\_name?  
User Id returned from inventory\_changes query, for all those id’s can we get the username from packs\_per\_day.

```auto
query {
        packs_per_day(user_id: ${userId}) {
          request_id  
          complexity
          data {
            edges {
              node {
                user_first_name
                user_last_name
              }
            }
          }
        }
      }

```

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Theresa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/theresa/32/377_2.png) [@Theresa](https://community.shiphero.com/u/Theresa)
#### Post date: [June 14, 2021, 3:20pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/6 "2021-06-14T15:20:27Z")

</div>

Hi  
If you get a userId, the query should return a result as long as the user did pack on that day.

---

<div class="post-metadata">

### Author: ![supritha](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@supritha](https://community.shiphero.com/u/supritha)
#### Post date: [June 14, 2021, 6:55pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/7 "2021-06-14T18:55:35Z")

</div>

Hi,  
So this query will return username only if that user packed on that day.  
If the user does an inventory change and will not pack on that day, this query will not return the username.  
Can I get any other query where fetching username using user\_id is not dependent on any other thing?

---

<div class="post-metadata">

### Author: ![supritha](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@supritha](https://community.shiphero.com/u/supritha)
#### Post date: [June 22, 2021, 9:46am UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/8 "2021-06-22T09:46:59Z")

</div>

Is there any other API to fetch username using user id, which is not dependent on packs\_per\_day?

---

<div class="post-metadata">

### Author: ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)
#### Post date: [June 22, 2021, 11:58am UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/10 "2021-06-22T11:58:57Z")

</div>

Hi @supritha!

We apologize for the delayed response about this.  
We have made an internal request to add this either to a new query or to the account query as a connection.  
Thanks again for the patience and we will keep you updated on the progress of the request!  
Tom

---

<div class="post-metadata">

### Author: ![askthebird](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@askthebird](https://community.shiphero.com/u/askthebird)
#### Post date: [July 10, 2021, 3:57pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/11 "2021-07-10T15:57:45Z")

</div>

I am interested in this as well.

We’re linking `picks_per_day` + `packs_per_day` data to our timesheet data. User first name + last name are a bit weak as far as keys go, so we’re hoping to translate user IDs to email addresses and link those to timesheets.

---

<div class="post-metadata">

### Author: ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)
#### Post date: [July 11, 2021, 6:41pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/12 "2021-07-11T18:41:29Z")

</div>

Thanks @askthebird !  
Added a +1 on our internal request 🙂

---

<div class="post-metadata">

### Author: ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)
#### Post date: [July 19, 2022, 8:10pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/13 "2022-07-19T20:10:01Z")

</div>

I was about to post this exact question when I found this topic. I also need to know the user first+last name instead of user\_id when querying for inventory changes.  
This topic is more than an year old - was this ever implemented and is there a solution now?  
Thank you

---

<div class="post-metadata">

### Author: ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)
#### Post date: [July 20, 2022, 12:41pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/14 "2022-07-20T12:41:39Z")

</div>

Hey @Raj,

Unfortunately, this has not been implemented yet and I don’t believe there is a work around for this.  
I have added a +1 internally for this and left a comment.

I’ll keep you all posted on the progress of this feature request!

Best,  
RayanP

---

<div class="post-metadata">

### Author: ![Raj](https://avatars.discourse-cdn.com/v4/letter/r/c0e974/32.png) [@Raj](https://community.shiphero.com/u/Raj)
#### Post date: [July 20, 2022, 5:12pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/15 "2022-07-20T17:12:09Z")

</div>

Thank you @sh-agent, though it’s really disappointing to know. I hope it changes soon.

---

<div class="post-metadata">

### Author: ![bbarrett](https://avatars.discourse-cdn.com/v4/letter/b/e9a140/32.png) [@bbarrett](https://community.shiphero.com/u/bbarrett)
#### Post date: [October 13, 2023, 3:37pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/16 "2023-10-13T15:37:06Z")

</div>

What is the status if this request? Will it get get added? When?

This is a very basic function that should be in your API.

---

<div class="post-metadata">

### Author: ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)
#### Post date: [October 16, 2023, 5:40pm UTC](https://community.shiphero.com/t/how-to-get-username-using-user-id/1364/17 "2023-10-16T17:40:04Z")

</div>

Hey @bbarrett,

Thanks for reaching out!

I’m unable to share much information about our development process, but there are no updates to share at the moment. I’ll bump this internally and relay your feedback for this.

Please let me know if you have any questions or concerns.

Best,  
RayanP
