Skip to content

Web API

Timothy Gibbons edited this page Mar 26, 2018 · 3 revisions

Web API

  • The could be used as your own repository of games.
  • Login/Register

The default api is https://sudo.root3287.site/api the data return is a json format.

Create Users

Method: POST

URL: /register

Body:

{
    "users": [
        {
            "username": "username",
            "password": "password",
            "password_conf": "password",
            "email": "user@test.com",
        },
    ],
}

Return:

{
"status":200
}

Login

Method: POST

URL: /login

Body:

{
    "user":{
        "username":"user",
        "password":"password"
    },
}

Return:

{
    "status": 200,
    "token": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
}

Clone this wiki locally