> ## Documentation Index
> Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# signin

> Create a user scope for end-user isolation

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    def signin(
        end_user_id: str,
    ) -> UserScope
    ```
  </Tab>

  <Tab title="Async">
    ```python theme={null}
    async def signin(
        end_user_id: str,
    ) -> AsyncUserScope
    ```
  </Tab>
</Tabs>

## Parameters

* `end_user_id` (str): End-user identifier to scope all operations

## Returns

* `UserScope` / `AsyncUserScope`: Scoped client that automatically includes `end_user_id`

## Examples

<Tabs>
  <Tab title="Sync">
    ```python theme={null}
    from morphik import Morphik

    db = Morphik()
    user = db.signin("user_123")
    docs = user.list_documents()
    ```
  </Tab>

  <Tab title="Async">
    ```python theme={null}
    from morphik import AsyncMorphik

    async with AsyncMorphik() as db:
        user = db.signin("user_123")
        docs = await user.list_documents()
    ```
  </Tab>
</Tabs>

## Notes

* You can also scope a folder to a user: `folder.signin("user_123")`.
