Use The Super Admin Accounts
When we have activated the super admin account, we can use it to authenticate ourselves against the Enterprise APIs or login in the UI.
Login as Super Admin via API
CURL
Endpoint:/auth/account/emailpass
| API Reference
Example Request
curl -X 'POST' \
'https://enterprise-sandbox.waltid.dev/auth/account/emailpass' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"email": "superadmin@walt.id",
"password": "super123456"
}'
Body
{
"email": "superadmin@walt.id",
"password": "super123456"
}
Body Parameters
email
: String - Email of the super admin account. Defined insuperadmin-registration.conf
.password
: String - Password of the super admin account. Defined insuperadmin-registration.conf
Response
{
"session_id": "39ed1ecd-aa61-4401-bf35-ca0a14a39c8e",
"status": "OK",
"token": "eyJhbGciOiJFZERTQSJ9.eyJzdWIiOiJmZmZmZmZmZi1mZmZmLWZmZmYtZmZmZi1mZmZmZmZmZmZmZmYiLCJzZXNzaW9uIjoiMzllZDFlY2QtYWE2MS00NDAxLWJmMzUtY2EwYTE0YTM5YzhlIn0.NEKj737AqG7T7SAfQ2RovhWSjBsXCWCLPmkLtr_O5i8q_42BFX7pSGZbIslRy1PEQ3HKrnXib6D06D1kZugvCw"
}
The token we receive can be used in subsequent requests as a Bearer token.
Authenticate as Super Admin via API
To access all protected endpoints of the Enterprise API, we will use the token obtained from the response of the previous request. This token should be included in the header of each subsequent request.
Example Request
curl -X 'POST' \
'https://enterprise-sandbox.waltid.dev/v1/...' \
-H 'Authorization: Bearer {tokenReceived}'
-d '{
...
}'