Authentication and Authorization API

Endpoints used to manage authentication and authorization of the account and sub-accounts.

Register sub-account

Register a new sub-account that would represent a counterparty to a contract. The Account ID and API Key for this account are returned. In order to make subsequent calls to ARC for this sub-account, you will need to securely store the API Key and Account ID.

The nodePassword should be base64 encoded. This password is used to protect the client's node. BlockSpaces does not store this, so you should record this password somewhere for each client. This will be used in the event the node needs to restart, it will be locked until this password is provided to unlock it.

Request format

method: 'POST'
endpoint: '/api/external/arc/auth/register-subaccount'
headers: { 'Content-Type': 'application/json', 'X-API-KEY': 'your api key' }
body: {
  "email": "your.customer@their.domain.com",
  "externalId": "some distinguishing ID for your system",
  "nodePassword": "cGFzc3dvcmQ="
}

Response format

{
  "accountId": "string",
  "apiKey": "string"
}

Last updated