> For the complete documentation index, see [llms.txt](https://docs.luciq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luciq.ai/references/user-identification-data/identify-user.md).

# Identify User

This API is primarily used to identify your user, sort of like a log in kind of method. The API takes two strings, the user's email being the first, and the user's name for the second.

{% tabs fullWidth="true" %}
{% tab title="iOS - Swift" %}

```swift
Luciq.identifyUser(withID: "1", email: "john.appleseed@apple.com", name: "John Appleseed")
```

{% endtab %}

{% tab title="iOS - ObjC" %}

```objectivec
[Luciq identifyUserWithID:@"1" email:@"john.appleseed@apple.com" name:@"John Appleseed"];
```

{% endtab %}

{% tab title="And - Java" %}

```java
Luciq.identifyUser("user name", "email");
```

{% endtab %}

{% tab title="And - Kotlin" %}

```kotlin
Luciq.identifyUser("user name", "email")
```

{% endtab %}

{% tab title="RN" %}

```javascript
Luciq.identifyUser("john.appleseed@apple.com", "John Appleseed");
```

{% endtab %}

{% tab title="Flutter" %}

```dart
Luciq.identifyUserWithEmail(String email, [String name]);
```

{% endtab %}
{% endtabs %}

{% hint style="danger" %}

#### IMPORTANT:  `userID` Must Be Unique

The `userID` you provide is the primary identifier for a user within the Luciq. You **must** ensure that this ID is unique for each of your users.

Providing a generic, non-unique ID (e.g., "`guest`" or "`unknown_user`") for multiple users will cause their data to be incorrectly merged. This will lead to critical data integrity and privacy issues, such as **different users being able to see and reply to each other's private chat conversations**.

If a user is anonymous, **do not call** the `identifyUser` API. The SDK will automatically handle a unique anonymous identity for you.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.luciq.ai/references/user-identification-data/identify-user.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
