What is an API member?
API members are wallets that sign on behalf of automated systems. Setting one up requires registration and admin approval. Before requesting a registration payload, an admin must invite the API member through the GUI so the wallet is eligible to register.Prerequisites
Before an API member can register, an admin must complete two steps in the Den dashboard:-
Create an API key - Navigate to Settings > API Keys and create a new key. This generates a key in the format
ck_live_...that the API member will use to authenticate SDK requests. - Invite the API member - Go to Members > New Member and enter the API member’s wallet address. Select which API key to associate with this member. The same API key can be shared across multiple API members if needed.
1) Set up the client and signer
Create the SDK client and signer used to authorize the registration.2) Request a registration payload
Request the payload for the invited API member wallet address.messageToSign.
3) Sign the payload off-chain
Sign the payload to prove control of the wallet.4) Submit the registration
Submit the signature to register the API member wallet.5) Admins add the member
Submit and execute a member proposal to activate the API member. Registration only validates ownership of the wallet. An admin must still submit a member proposal to add the API member to the organization and execute it.Production signing setups
TheprivateKeyToAccount example in this guide is for local development. Here are some example patterns you can use in production See Signing keys to learn more.
Example patterns
Example patterns
Cloud KMSHSMEnvironment variable