Skip to content

User Management

THESE MESSAGES ARE FORWARDED FROM THE OMEGA

Section titled “THESE MESSAGES ARE FORWARDED FROM THE OMEGA”

There are additional security checks when Changing data, Changing the Iota, Deleting a User, Deleting an Iota. These messages can only be run when the affected User / Iota is identified.

Either username or user_id is required when getting a user profile, user_id is preferred.

{
"type": "get_user_data",
"id": "<uuid>",
"data": {
"username": "<username>",
"user_id": "<user id>"
}
}
{
"type": "get_user",
"id": "<uuid>",
"data": {
"user_id": user id,
"iota_id": iota id,
"created_at": int, // UNIX Timestamp
"username": "<username>",
"display": "<display name>",
"avatar": "<base64 avatar>",
"about": "<base64 about>",
"status": "<status>",
"public_key": "<base64 public key>",
"sub_level": int,
"sub_end": int
}
}
{
"type": "change_user_data",
"id": "<uuid>",
"data": {
"user_id": "",
"public_key": "",
"username": "",
"display": "",
"avatar": "",
"about": "",
"status": ""
}
}
{
"type": "success",
"id": "<uuid>"
}

Provide the users current and new Reset-Token.

{
"type": "change_user_data",
"id": "<uuid>",
"data": {
"iota_id": "<uuid>",
"reset_token": "<base64 random bytes>",
"new_token": "<base64 random bytes>"
}
}
{
"type": "success",
"id": "<uuid>"
}

You can use this to register a User or Iota. The User-creation process timeouts after 1 hour.

{
"type": "get_register",
"id": "<uuid>"
}
{
"type": "get_register",
"id": "<uuid>",
"data": {
"user_id": id (unix timestamp)
}
}

Complete a registration, both for Iota’s and User’s.

{
"type": "complete_register_user",
"id": "<uuid>",
"data": {
"user_id": id (must be provided by get_register),
"username": "",
"public_key": "",
"username": "",
"iota_id": id,
"reset_token": ""
}
}
{
"type": "success"
}
{
"type": "complete_register_iota",
"id": "<uuid>",
"data": {
"iota_id": id,
"public_key": "<base64 public key>"
}
}
{
"type": "success"
}
{
"type": "delete_profile",
"id": "<uuid>",
"data": {
"user_id": id
}
}
{
"type": "success"
}
{
"type": "delet_profile",
"id": "<uuid>",
"data": {
"iota_id": id
}
}
{
"type": "success"
}