Register a new API User
Last updated 1 year ago
This guide will walk you through the steps to register a new API user on your ledger enterprise workspace, ensuring a secure and professional integration. Follow these detailed instructions to obtain the authentication keys needed to access Ledger Enterprise API seamlessly.
Step 1: Generate API Operator Authentication Keys
Generate the API Operator keys pairs in hexadecimal output format using :
Elliptic curve
SECP256R1
Private key encoding
encoding
PEMprivate format
TraditionalOpenSSL
public key encoding
encoding
X962private format
X9.62 Uncompressed Point
To generate authentication keys in the required format you can get inspiration from the provided code samples:
Python
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import ec
def generate_keys():
private_key = ec.generate_private_key(ec.SECP256R1(), default_backend())
private_key_bytes = private_key.private_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PrivateFormat.TraditionalOpenSSL,
encryption_algorithm=serialization.NoEncryption(),
)
private_key_hex = private_key_bytes.hex()
public_key_bytes = private_key.public_key().public_bytes(
encoding=serialization.Encoding.X962,
format=serialization.PublicFormat.UncompressedPoint,
)
public_key_hex = public_key_bytes.hex()
return private_key_hex, public_key_hex
# Example of generated keys
private_key, public_key = generate_keys()
print(f"Private Key: {private_key}")
print(f"Public Key: {public_key}")Javascript
Example Response:
Step 2: Register the API user on your workspace
Log in as an Admin to your Ledger Enterprise workspace.
Navigate to the Users section and click "Invite User."
Register an API Operator
Select "Operator - Via Self Managed Key Pair."

Enter the API username (e.g., demo api user) and the API user public key.
Confirm and seek approval from other Admins.
Register an API Admin
Select "API Administrator - Via Self Managed Key Pair"

Enter the API username (e.g., "API Admin 1") and the API user public key.
Confirm and seek approval from other Admins.
Step 3: Generate API Access for the new API user
The following steps are the same for an API Operator and an API Admin.
Visit the Users page and click "Generate API Access" next to the respective user. This action is one-time, but API secret regeneration is possible via user permission settings.

Copy the API Key ID and API Secret to a secure location, theses are the authentication credentials.

Step 4: Assign the new API user to workspace rules
API Operator
An API Operator can be assigned to workspace rules just like any other user.
You can assign them to a user group.
You can assign them directly to an account rules.
API Administrator
Once fully registered, an API Administrator can only make read-only requests. A human administrator must grant them more rights so they can perform more tasks. For this, they should be assigned to an "Admin group".
Go to Settings > Admin rules.
In the table "API Admin rules", edit a rule to add the registered API Administrator to it.
Review and validate the request, it will then have to be reviewed by members of the Master Administration Rule.
What's next?
Your API user is now ready to take on their first steps.
Last updated