Skip to main content
Version: 1.0.0


Initial Setup

The LoginID Server SDK enables you to perform operations which are protected, enabling much more robust functionality for your users.

Create API Credential on the Dashboard

An application must be created on the LoginID Dashboard in order to correctly configure the Server SDK.

Once logged into the dashboard, navigate to the Applications tab in the sidebar, select “Add Application,” and select Management.

In the resulting form, you must create a name for your application and provide an API credential to be associated with this application. If you have already created an application, we suggest using the naming convention of “{my-app) server.”

When adding the API credential, you can either upload your own public key, or have us generate a key pair on your behalf.


All API calls made from a Management integration type require an API Service Token

Add SDK to Existing Application

git clone
cd python-sdk

pip install .

Create an SDK Instance

from loginid import LoginID

lid = LoginID(client_id=CLIENT_ID, private_key=PRIVATE_KEY)

If using a custom base_url, you can initialize the SDK with that base_url. Otherwise, it will default to the main LoginID production environment.

Application API Reference

LoginID Class


This server SDK leverages either a web or mobile application and requires an API credential to be assigned to that integration.

Helper Functions


Generate a service token, to be used when making protected API calls. Not required when calling other methods with the server SDK.


Verify a JWT returned upon user authentication.


Generates the bearer token to be used in the transaction confirmation flow, as it has a specific format slightly different from the standard service tokens. This function generates that token. If calling the create_tx method, this function does not need to be called first.


Create a transaction ID. This is typically the first step of the transaction confirmation flow.

The transaction id if no error


Verify the jwt returned in the confirmTransaction flow.

Management API Reference

LoginIdManagement Constructor

This server SDK can be used with a management application and requires an API credential to be assigned to that integration. All calls made from this SDK are intended to be backend-to-backend calls, as the operations are sensitive.


Generate a code, which can be used for a variety of purposes. Check out the guides section for how various ways these codes can be used.


Authorize a code which was previously generated through the generate_code method.


Submit a code and wait for it to be authorized. You can use this method when leveraging the code to authenticate a user.


Invalidate all codes of a given type for a specific user.

Credential Management Functions


Get an exhaustive list of credentials for a given user.


Rename a credential given the credential id.


Revoke a credential so it can longer be used.

User Management Functions


Get the user profile given a username


Temporarily deactivate a user account.


Re-activate a previously deactivated user profile.


Deletes a user profile based on a user_id as the input. This operation cannot be undone.


Deletes a user profile based on a username as the input. This operation cannot be undone.