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

# LastPass

## Overview

<CardGroup cols={3}>
  <Card title="Pre-built tooling" icon="screwdriver-wrench" href="#pre-built-tooling" />

  <Card title="Pre-built integrations" icon="square-check" href="#pre-built-integrations" />

  <Card title="Access requirements" icon="triangle-exclamation" href="#access-requirements" />

  <Card title="Setup guide" icon="rocket" href="#setup-guide" />

  <Card title="Useful links" icon="circle-info" href="#useful-links" />

  <Card title="API gotchas" icon="biohazard" href="#api-gotchas" />
</CardGroup>

## Pre-built tooling

<AccordionGroup>
  <Accordion title="✅ Authorization">
    | Tools                           | Status |
    | ------------------------------- | ------ |
    | Pre-built authorization (Basic) | ✅      |
    | Pre-built authorization UI      | ✅      |
    | Custom authorization UI         | ✅      |
    | End-user authorization guide    | ✅      |
    | Expired credentials detection   | ✅      |
  </Accordion>

  <Accordion title="✅ Read & write data">
    | Tools                                     | Status                         |
    | ----------------------------------------- | ------------------------------ |
    | Pre-built integrations                    | ✅                              |
    | API unification                           | ✅                              |
    | 2-way sync                                | ✅                              |
    | Webhooks from Nango on data modifications | ✅                              |
    | Real-time webhooks from 3rd-party API     | 🚫 (time to contribute: \<48h) |
    | Proxy requests                            | ✅                              |
  </Accordion>

  <Accordion title="✅ Observability & data quality">
    | Tools                   | Status |
    | ----------------------- | ------ |
    | HTTP request logging    | ✅      |
    | End-to-end type safety  | ✅      |
    | Data runtime validation | ✅      |
    | OpenTelemetry export    | ✅      |
    | Slack alerts on errors  | ✅      |
    | Integration status API  | ✅      |
  </Accordion>

  <Accordion title="✅ Customization">
    | Tools                              | Status                         |
    | ---------------------------------- | ------------------------------ |
    | Create or customize use-cases      | ✅                              |
    | Pre-configured pagination          | 🚫 (time to contribute: \<48h) |
    | Pre-configured rate-limit handling | 🚫 (time to contribute: \<48h) |
    | Per-customer configurations        | ✅                              |
  </Accordion>
</AccordionGroup>

### Users

| Function name | Description                            | Type                                           | Source code                                                                                                          |
| ------------- | -------------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `create-user` | Creates a user in Lastpass.            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/lastpass/actions/create-user.ts) |
| `delete-user` | Deletes a user in Lastpass.            | [Action](/guides/functions/action-functions)   | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/lastpass/actions/delete-user.ts) |
| `users`       | Fetches a list of users from Lastpass. | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/lastpass/syncs/users.ts)         |

## Setup guide

*No setup guide yet.*

<Tip>Need help getting started? Get help in the [community](https://nango.dev/slack).</Tip>

<Note>Contribute improvements to the setup guide by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/lastpass.mdx)</Note>

## Useful links

* [Generating your LastPass credentials](https://support.lastpass.com/s/document-item?language=en_US\&bundleId=lastpass\&topicId=LastPass/t_cid_and_hash_locate.html&_LANG=enus)
* [LastPass API docs](https://support.lastpass.com/s/document-item?language=en_US\&bundleId=lastpass\&topicId=LastPass/use-provisioning-api.html&_LANG=enus)
* [LastPass Enterprise API Postman collection﻿](https://support.lastpass.com/s/document-item?language=en_US\&bundleId=lastpass\&topicId=LastPass/use_lastpass_enterprise_api_postman_collection.html&_LANG=enus)

<Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/lastpass.mdx)</Note>

## API gotchas

* LastPass in Nango uses `Basic` auth mode to access different endpoints. Please provide your `cid` as your username and `provhash` as your password values.
* After creating a connection, you can use the Basic credentials as follows;

```js theme={null}
const connection = await nango.getConnection();
let credentials: { cid?: string; provhash?: string } = {};
if ('username' in connection.credentials && 'password' in connection.credentials) {
  credentials = {
    cid: connection.credentials.username,
    provhash: connection.credentials.password,
  };
} else {
  throw new nango.ActionError({
    message: `Basic API credentials are incomplete`
  });
}
const postData = {
  cid: credentials.cid,
  provhash: credentials.provhash,
  cmd: "batchadd",
  "data": [
    {
      "username": "user4@lastpass.com",
      "fullname": "Jane Smith",
      "password": "DefaultPassword",
      "password_reset_required": false
    }
  ]
};

const resp = await nango.post({
  data: postData,
});
```

<Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/lastpass.mdx)</Note>

## Going further

<Card title="Connect to LastPass" icon="link" href="/integrations/all/lastpass/connect" horizontal>
  Guide to connect to LastPass using Connect UI
</Card>
