> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/license-api/list-license-users-for-customer.md).

# List License Users for Customer

Returns a list of all license users assigned to licenses belonging to the requested customer (user-based products only).

### Endpoint

* Method: `GET`
* Path: `/api/v4/customer_license_users`
* Description: Retrieves license users by customer email for a product.

***

### Authentication

See [License API Authorization](/license-api/license-api-authorization.md).

#### Required headers

* `Date` (string)
* `Authorization` (string)

#### Recommended headers

* `Accept: application/json`

### Request

#### Query parameters

* `product` (string, required) — Product short code
* `customer` (string, required) — Customer email (e.g. `user@example.com`)

***

### Examples

{% tabs %}
{% tab title="curl" %}

```bash
curl --location --request GET '/api/v4/customer_license_users?product=string&customer=string' \
--header 'Accept: application/json' \
--header 'Date: string' \
--header 'Authorization: string'
```

{% endtab %}

{% tab title="nodejs" %}

```javascript
var request = require('request');
var options = {
  method: 'GET',
  url: '/api/v4/customer_license_users?product=string&customer=string',
  headers: {
    'Accept': 'application/json',
    'Date': 'string',
    'Authorization': 'string'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
```

{% endtab %}

{% tab title="javascript (fetch)" %}

```javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Date", "string");
myHeaders.append("Authorization", "string");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("/api/v4/customer_license_users?product=string&customer=string", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="python" %}

```python
import requests

url = "/api/v4/customer_license_users?product=string&customer=string"

headers = {
  "Accept": "application/json",
  "Date": "string",
  "Authorization": "string"
}

response = requests.get(url, headers=headers)
print(response.text)
```

{% endtab %}

{% tab title="ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("/api/v4/customer_license_users?product=string&customer=string")

http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Date"] = "string"
request["Authorization"] = "string"

response = http.request(request)
puts response.read_body
```

{% endtab %}
{% endtabs %}

***

### Response

### Type definition

```typescript
type LicenseUsersForCustomerResponseBody = {
  customer: {
    address: string,
    city: string,
    company_name: string,
    country: string,
    customer_account: string | null,
    email: string,
    first_name: string,
    last_name: string,
    phone: string,
    postcode: string,
    reference: string,
    state: string,
    metadata: JSON,
  },
  users: ({
    email: string,
    first_name: string,
    initial_password: string,
    is_active: boolean,
    is_initial_password: boolean,
    last_name: string,
    license_id: number,
    max_activations: number,
    order_id: number,
    order_store_id: string,
    phone_number: string,
    total_activations: number,
  })[]
}
```

### Example (200)

```json
{
    "customer": {
        "email": "test@example.com",
        "first_name": "",
        "last_name": "",
        "company_name": "",
        "phone": "",
        "reference": "",
        "address": "",
        "postcode": "",
        "city": "",
        "country": "",
        "state": ""
    },
    "users": [
        {
            "email": "test1@example.com",
            "is_active": true,
            "first_name": "",
            "last_name": "",
            "phone_number": "",
            "is_initial_password": true,
            "initial_password": "t218_uv@",
            "license_id": 34524352345,
            "order_store_id": "67e58562adfsfsdf1aff4b1f551d30326",
            "order_id": 45367563535423
        },
        {
            "email": "test2@example.com",
            "is_active": true,
            "first_name": "0",
            "last_name": "0",
            "phone_number": "0",
            "is_initial_password": false,
            "initial_password": "",
            "license_id": 786856745645,
            "order_store_id": "gdfge34r4fqf44qqrf43f",
            "order_id": 653456345635
        }
    ]
}
```

***

### Errors

If an error occurs, the response will have an HTTP status code of 400 or higher, and the response body will contain an error description in the following format:

```typescript
{
  status: number,
  code: string,
  message: string
}
```

JSON Schema:

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "status": { "type": "number" },
    "code": { "type": "string" },
    "message": { "type": "string" }
  },
  "required": [
    "status",
    "code",
    "message"
  ],
  "additionalProperties": false
}
```

### List of exceptions

> unknown\_product (400): Provided product was not found

> missing\_headers (400): Some headers are missing

> invalid\_product\_auth\_method (400): Product authorization method is invalid: { params }.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.licensespring.com/license-api/list-license-users-for-customer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
