User Management
Getting a user
Section titled “Getting a user”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_data", "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 }}Change Data about user
Section titled “Change Data about user”{ "type": "change_user_data", "id": "<uuid>",
"data": { "user_id": int,
"public_key": "", "username": "", "display": "", "avatar": "", "about": "", "status": "" }}{ "type": "success", "id": "<uuid>"}Changing the iota
Section titled “Changing the iota”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>"}Get a Register-ID
Section titled “Get a Register-ID”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": { "register_id": id (unix timestamp) }}Complete a Registration
Section titled “Complete a Registration”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"}Delete a User
Section titled “Delete a User”{ "type": "delete_profile", "id": "<uuid>",
"data": { "user_id": id }}{ "type": "success"}Delete an Iota
Section titled “Delete an Iota”{ "type": "delet_profile", "id": "<uuid>",
"data": { "iota_id": id }}{ "type": "success"}