Email/Password Auth

To create a new user account, you need to send a POST request to the following endpoint:

Create User Account

CURL

API Reference

Each created account receives a default "did:key" and private key (Ed25519).

curl -X 'POST' \
  'http://0.0.0.0:7001/wallet-api/auth/create' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Max Mustermann",
  "email": "test@email.com",
  "password": "password",
  "type": "email"
}'

Body Parameters

{
  "name": "string",
  "email": "string",
  "password": "string",
  "type": "{type}"
}
  • name: string - The name of the user.
  • email: string - The email of the user.
  • password: string - The password of the user.
  • type: string - The type of the user account. email or address (for web3 login).

Login

CURL

API Reference

curl -X 'POST' \
 'http://0.0.0.0:7001/wallet-api/auth/login' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "email",
  "email": "user@email.com",
  "password": "password"
}'

Body Parameters

{
  "type": "{type}"
  "email": "string",
  "password": "string"
}
  • type: string - The type of the user account. email or address (for web3 login).
  • email: string - The email of the user.
  • password: string - The password of the user.

Example Response
Now a session is automatically created for cookie-based authentication. For Bearer Token Authentication, the token returned must be provided in the header for each request that needs authentication. Refer to the overview section for more details.

{
  "token": "KL-a_dk1qO8moCX4gxaGfb7_TS8RK-JWVKZk9BBP0-s",
  "id": "018045e5-942c-4362-b535-658c4dd581ef",
  "username": "user@email.com"
}

Logout

CURL

API Reference

Deletes the session/invalidates the token.

curl -X 'POST' \
  'http://0.0.0.0:7001/wallet-api/auth/logout' \
  -H 'accept: */*' \
  -d ''