> ## 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

> [card] [Pre-built tooling](#pre-built-tooling)

> [card] [Pre-built integrations](#pre-built-integrations)

> [card] [Access requirements](#access-requirements)

> [card] [Setup guide](#setup-guide)

> [card] [Useful links](#useful-links)

> [card] [API gotchas](#api-gotchas)

## Pre-built tooling

> [accordion] ✅ Authorization
>
> | Tools | Status |
> | - | - |
> | Pre-built authorization (Basic) | ✅ |
> | Pre-built authorization UI | ✅ |
> | Custom authorization UI | ✅ |
> | End-user authorization guide | ✅ |
> | Expired credentials detection | ✅ |

> [accordion] ✅ 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] ✅ 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] ✅ 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 | ✅ |

### Users

| Function name | Description | Type |
| - | - | - |
| `users` | Fetches a list of users from Lastpass. | [Sync](https://nango.dev/docs/guides/functions/syncs/sync-functions.md) |

### Others

| Function name | Description | Type |
| - | - | - |
| `create-user` | Creates a user in Lastpass. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |
| `delete-user` | Deletes a user in Lastpass. | [Tool](https://nango.dev/docs/guides/functions/tools.md) |

## Setup guide

*No setup guide yet.*

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

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

## 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)

## 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)

## Going further

> [card] [Connect to LastPass](https://nango.dev/docs/integrations/all/lastpass/connect)
>
> Guide to connect to LastPass using Connect UI


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.