Skip to content
Mistium edited this page Jan 30, 2024 · 14 revisions

Info

Network commands let you interact with the internet, and the origin account server, the accounts system requires the "account" permission.

The originOS server allows you to log into your accounts and sync things like your profile picture, username, accent colour and a few other things over any originOS installation, on any computer.

You can also store your files in your origin account so you can log in and get back everything you had on any other computer.

Commands

New_Account

network "signup" [username] [plaintext_password]

On Success:

You will gain access to all the other network commands to get info about yourself

  • "Account Created Successfully" (The return value from the server when you successfully log in)

Possible errors:

  • "Account Password Cannot Be Null" (You didn't send a password)
  • "Account Username Cannot Be Null" (You didn't send a username)
  • "Username Already In Use" (An account already exists with that username)
  • "New Account Exceeded 1kb" (Your username is wayyyyyyyyyy to long)

Update

network "update" [key] [value]

You can set any key (doesn't have to be included below) to anything

Some keys are:

  • "pfp" (url to an image that is used as your profile picture)
  • "email" (It's your email)
  • "accent" (This is the accent colour that is linked to your account)

On success:

  • "Account Updated Successfully" (Your account has been updated with no issues)

Possible Errors:

  • "Not Logged In" (You aren't logged into an origin account)
  • "Update Value Must Be Less Than 500 Characters" (You tried to set a key to a value longer than 500 characters of text)
  • "Account Cannot Be Bigger Than 10kb" (You tried to upload a key to a value that would push your account's total size over 10kb)
  • "Unable to update: ["ips","last_login","max_size"]" (The key you tried to set is protected and not directly editable)

Login

This command allows you to log into an origin account

network "login" [username] [password_as_plaintext]

Return Values:

  • "Successful Login" (You are now logged in on the server)
  • "Invalid Details" (The login details are wrong)

Get_Account_Username

network "search" [username]

On Success:

(Example received account object)

[
  {
    "username": "Mistium",
    "pfp": "https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33",
    "accent": "#57cdac"
  }
]

Errors:

  • "Account Not Found" - if the account doesn't exist you will get this message

My_Accounts

Returns a list of all accounts that have been logged in or created with your ip in the past

network "my_accounts"

On Success:

(Example received account object)

[
  {
    "username": "Mistium",
    "pfp": "https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33",
    "accent": "#57cdac",
    "ips":[your ip will be here along with all other ips that have logged into this account],
    "last_login":"unicode timestamp of the last time this account was logged into"
  },
  {
    "username": "Mist2",
    "pfp": "https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33",
    "accent": "#57cdac",
    "ips":[your ip will be here along with all other ips that have logged into this account],
    "last_login":"unicode timestamp of the last time this account was logged into"
  }
]

Or if you have no previous accounts you will be returned []

Ping

This command requires only your current timestamp, it returns an integer of how many milliseconds it took to receive the ping back.

network ping

Remove_Myself

network "remove_myself"

This command removes your ip from your currently logged into account, this allows you to remove it from your login page on boot

Possible Errors:

  • "Not Logged In" (You aren't logged into an origin account)

Myself

This command returns the data for the account you are currently logged into.

network "myself"

Possible Errors:

  • "Not Logged In" (You aren't logged into an origin account)

On Success:

(Example received account object)

{
  "username":"Mist",
  "password":"",
  "ips":[""],
  "accent":"#57cdac","last_login":1703515687862,
  "max_size":"50000",
  "pfp":"https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33"
}

All your other keys (such as ones set through the update command) will be in this json too

Possible Errors:

  • "Not Logged In" (You aren't logged into an origin account)

originOS Wiki

Wiki Views:
:views

OSL | RSH | ICN

Clone this wiki locally