Introduction

Authentication

Authentication methods and standards

The Serverista API uses API keys and Decentralized Identifier (DID) to authenticate requests. In the IAM section you can create API or DID keys.

All API requests must use HTTPS. Requests made over HTTP or without proper authentication will fail.

API Key

Create your API Key

Login to https://serverista.com and navigate to IAM page.

Click on New User to open the modal

API Key Access type

In the modal above select API in the Access Type option, select a Role and enter Name for the API Key.

Once you click on submit, you will be given your API secret key, make sure to save this key securely as we are not storing it.

Store your API Key in a secure environment and make sure you assign a role with least privileges.

DID Key Access type

If you want to create a DID key associated with your account, in the modal above select DID Key in the Access Type option, select a Role, enter your DID in DID Key and enter Name for the DID Key.

Once you click on submit, your account will be associated with the submited DID.

DID keys can be used in decentralised environments without the need for an API Key. A DID is basically a public key which will be used to authenticate messages signed by a private associated with the DID.

We have a client SDK implemented to allow libp2p networks utilise DID authentication allowing peers to execute any endpoint natively. https://github.com/serverista/p2p-client

Use your API Key

You can use your API Key either through our SDKs or HTTP endpoints:

POST /v1/users/account
curl -X POST https://api.serverista.com/v1/users/account \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{somedata..}'