---
title: User API
description: >-
  The User API retrieves information about the currently logged-in user, such as
  their name, email, and account access level. The response shape depends on the
  platform — admin users and POS users return different sets of properties.
api_version: v1.0
source_url:
  html: >-
    https://shopify.dev/docs/api/app-home/latest/apis/authentication-and-data/user-api
  md: >-
    https://shopify.dev/docs/api/app-home/latest/apis/authentication-and-data/user-api.md
api_name: app-home
---

# User API

**Info:**

App Bridge isn't versioned with Polaris. App Bridge APIs and web components are identical in every App Home reference version.

The User API retrieves information about the currently logged-in user, such as their name, email, and account access level. The response shape depends on the platform: admin users and POS users return different sets of properties.

### Use cases

* **User personalization:** Personalize the app experience based on the logged-in user's name and role.
* **Staff identification:** Identify which staff member is using the app for audit logging or permissions.
* **POS user context:** Access POS-specific user data like assigned location when running on Shopify POS.
* **Account details:** Retrieve the current user's email and account type for display or communication.

## Admin​User​API()

When the user is logged into the Shopify admin, `shopify.user()` returns the user's account access level.

### Returns

* **Promise\<AdminUser>**

### AdminUser

* accountAccess

  The account access level of the logged-in user.

  ```ts
  string
  ```

## POSUser​API()

When the user is logged into Shopify POS, `shopify.user()` returns the user's ID, first and last name, email, account access level, and account type.

### Returns

* **Promise\<POSUser>**

### POSUser

* accountAccess

  The account access level of the logged-in user.

  ```ts
  string
  ```

* accountType

  The user's account type.

  ```ts
  string
  ```

* email

  The user's email address.

  ```ts
  string
  ```

* firstName

  The user's first name.

  ```ts
  string
  ```

* id

  The staff member's numeric ID.

  ```ts
  number
  ```

* lastName

  The user's last name.

  ```ts
  string
  ```

Examples

### Examples

* ####

  ##### Description

  Retrieve information about the current user. The properties available in the response depend on whether the user is logged into the Shopify admin or Shopify POS.

  ##### js

  ```js
  const user = await shopify.user();

  console.log(user.accountAccess); // => 'full'
  ```

* ####

  ##### Description

  On Shopify POS, the user object includes additional properties such as \`firstName\`, \`lastName\`, and \`accountType\` that are not available on the admin.

  ##### js

  ```js
  const user = await shopify.user();

  console.log(user.id); // => 12345
  console.log(user.firstName); // => 'Jane'
  console.log(user.lastName); // => 'Doe'
  console.log(user.email); // => 'jane@example.com'
  console.log(user.accountAccess); // => 'full'
  console.log(user.accountType); // => 'regular'
  ```

***
