lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.86k stars 290 forks source link

LastPass API Interface #234

Closed ribbles closed 6 years ago

ribbles commented 7 years ago

Hi,

The lastpass-cli was written with intimate knowledge of the LastPass APIs. Is this documented anywhere? We have an enterprise licence and would much prefer to call the APIs directly from within our code. Attempting to understand the lastpass-cli source code is possible, but not desirable.

Any help would be appreciated @bcopeland !

Thanks.

bcopeland commented 7 years ago

On Thu, Dec 29, 2016 at 04:30:55PM -0800, Dan wrote:

Hi,

The lastpass-cli was written with intimate knowledge of the LastPass APIs. Is this documented anywhere? We have an enterprise licence and would much prefer to call the APIs directly from within our code. Attempting to understand the lastpass-cli source code is possible, but not desirable.

Any help would be appreciated @bcopeland !

No, it is not documented. endpoints*.c is your best bet for seeing the entry points.

-- Bob Copeland %% http://bobcopeland.com/

bcopeland commented 7 years ago

Is there a specific endpoint you would like more information on? Vault operations? Shared folder operations?

ribbles commented 7 years ago

Hi,

I have been able to successfully login and add an account. My use-case is to add/update/delete accounts in a shared folder.

  1. Can I add directly into a shared folder? 1.1. endpoints.c line 192 infers that this might be possible, although when I do it, the account is created in the share correctly, but all encrypted fields are blank (i.e user, pass & notes, but not url). 1.2. Is there a special key for the shared folders - where might I get this?
ribbles commented 7 years ago

I discovered the page at https://lastpass.com/enterprise_push.php?encryptionhelp=1&encryptionhelp=1&lpnorefresh=1 which resolved this issue.

ribbles commented 7 years ago

Hi Bob,

We would like to have buttons in our own web app that launches an auto-login via chrome, i.e.

<a href="chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/extensionLogin.html?aId=1234567898767">Login</a>

Can we construct a URL to do this? Sifting through the extensions minified source code is proving daunting....

bcopeland commented 7 years ago

At this time, no, there's not a way to do that. I floated it to one of the extension developers who suggested it could be added. Probably the next step would be to open a ticket through the normal lastpass support channel.