User-Server Endpoints

Errors

These errors may occur at any point and should be handled appropriately. - 401 -> You may be missing the correct Authentication. - 500 -> There was a server side error, display a comforting error to the end user.

Authentication

Bearer Token

The OAuth2 bearer token can be obtained by logging in with the Authenticate endpoint. It must be attached to every authenticated request under the header Authorization, in the form Bearer <token>.

Server Bearer Token

The server has a static Token that is known to be owned by the server.

Client Endpoints

Server Status /status - GET
Create User /users - POST
Authenticate /login - POST
Get My User /users/me - GET
Get a User /users/{userId} - GET
Get a User's Avatar /users/{userId}/avatar - GET
Set my Avatar /users/me/avatar - POST
Purchase Blocks /purchase - POST
Create Robot /users/me/robots - POST
Delete Robot /users/me/robots/{garageSlot} - DEL
Edit Robot /users/me/robots/{garageSlot} - PATCH
Edit Credentials /users/me - PATCH
Get Robots /users/me/robots - GET
Get Robot /users/me/robots - GET
Get Inventory /users/me/inventory - GET
Get Statfile Hash /statfile/hash - GET
Get Statfile /statfile - GET

Server Endpoints

Validate User Token /validate - GET
Rewards /reward - POST