Inspired by the Steam game Bitburner
Don't want to scroll through all this?
Then simply click on one of these links!
Cannot find what you're looking for above?
Try looking at some possible ouputs for all endpoints
This assumes a basic knowledge of HTTP
This api is an HTTP api. you can send a message to a server running Crypto Versus and it will respond. This is all you need to do to create a script! (wow, so simple)
Sending HTTP requests is clunky. it gets annoying, and confusing quickly when you have loads of them. This is why we highly recommend you use a wrapper.
Wrappers will do exactly the same thing for you, but in a much more intuitive way
The official server is hosted on Heroku.
Main branch domain: https://cry-vs.herokuapp.com/ Dev branch domain*: https://beta-cry-vs.herokuapp.com/
This response is the result of a request that cannot be parsed into json
To prevent this response from happening, across all languages, it is recommended to send String formatted json
Json parsing failed.
This response is the result of a request made on an unfinished or invalid endpoint
This route is not available / not found.
This response is the result of a request made using a method invalid with the current endpoint
path '/[Path]' should always be requested with method '[Method]'.
[Path] is the requested endpoint
[Method] is the request method used
This response is the result of an internal server error
This is always a bug and if encountered, tell us!
Internal server error
List of all routes and usage guides. this goes for a while so bear with us. * deep breath *
'POST'
{"username":[Username], "password":[Password]}
[Username] and [Password] are expected to be string values
Legal characters that can be used for thoses parameters are:
ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.+<>(){}[]|:;~/\!?&$#*@
(Case insensitive)
This response is the result of a successful account creation
{"expire":[Lifetime], "user":[Username], "key":[KeyEnabled]}
[Lifetime] is the returned token's lifetime in ms, if you plan on making a wrapper, we suggest refreshing the token before the lifetime ends
[Username] is the requested account username
[KeyEnabled] is a bool representing either the requested account has api key enabled or not
[Token]
[Token] is a connection token used to authenticate yourself when making requests to other endpoints
A connection token created by this path lasts 20 minutes before expiring
This response is the result of a missing parameter in the input json
Username is required.
or
Password is required.
This response is the result of an illegal character detected in either the username or password
Username contains the following illegal character: "[Char]"
or
Password contains the following illegal character: "[Char]"
[Char] is the character that posed a problem
This response is the result of a username or password with an length over 30 or under 1
Username and password must have a length of 1 to 30 characters.
This response is the result of a username or password which type is not "String"
Unexpected type for username.
Expected String.
or
Unexpected type for password.
Expected String.
This response is the result of a request done on an already registered account username
[Username] already exists.
[Username] is the requested account username
'POST'
{"username":[Username],"password":[Password]}
[Username] and [Password] are expected to be string values
Legal characters that can be used for thoses parameters are:
ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.+<>(){}[]|:;~/\!?&$#*@
(Case insensitive)
This response is the result of a successful connection
{"expire":[Lifetime], "user":[Username], "key":[KeyEnabled]}
[Lifetime] is the returned token's lifetime in ms, if you plan on making a wrapper, we suggest refreshing the token before the lifetime ends
[Username] is the requested account username
[KeyEnabled] is a bool representing either the requested account has api key enabled or not
[Token]
[Token] is a connection token used to authenticate yourself when making other requests
A connection token created by this path lasts 10 minutes before expiring
This response is the result of a missing parameter in the input json
Missing login info
This response is the result of an illegal character detected in either the username or password
Username contains the following illegal character: "[Char]"
or
Password contains the following illegal character: "[Char]"
[Char] is the character that posed a problem
This response is the result of a request done on an unexistant account
[Username] doesn't exists.
[Username] is the requested account username
This response is the result of a request done on an account with a password that doesn't match the account password
Invalid password.
This response is the result of an api key used in a request on an account that does not have api key enabled
[Username] does not have key enabled.
[Username] is the requested account username
This response is the result of a username or password which type is not "String"
Unexpected type for username.
Expected String.
or
Unexpected type for password.
Expected String.
'POST'
{"token":[Token]}
[Token] is expected to be a string value
Any valid connection token can be used
Optionnal additional info
{"username":[Username], "password":[Password], "keyEnabled":[KeyEnabled]}
[KeyEnabled] is expected to be a boolean value
[Username] and [Password] are expected to be string values
Legal characters that can be used for thoses parameters are:
ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.+<>(){}[]|:;~/\!?&$#*@
(Case insensitive)
This response is the result of a successful request
{"user":[Username], "key":[KeyEnabled]}
[Username] is the requested account username
[KeyEnabled] is a bool representing either the requested account has api key enabled or not
Account updated!
This response is the result of a missing token parameter in the input json
Token is required.
This response is the result of requesting to the endpoint with an invalid/expired token
Token is invalid.
This response is the result of an illegal character detected in either the username or password
Username contains the following illegal character: "[Char]"
or
Password contains the following illegal character: "[Char]"
[Char] is the character that posed a problem
'POST'
{"token":[Token]}
[Token] is expected to be a string value
Any valid connection token can be used
This response is the result of a successful account deletion
[Username] deleted successfully!
[Username] is the token's corresponding account username
This response is the result of a missing token parameter in the input json
Token is required.
This response is the result of requesting to the endpoint with an invalid/expired token
Token is invalid.
This response is the result of a valid request that somehow created a database error
This should never happen, if it does, tell us
'POST'
{"token":[Token]}
[Token] is expected to be a string value
Any valid connection token can be used
This response is the result of a successful token refresh
Reminder that this endpoint does not* increase the lifetime of the current token
It generates a new one and invalidates the first
{"expire":[Lifetime]}
[Lifetime] is the returned token's lifetime in ms, if you plan on making a wrapper, we suggest refreshing the token before the lifetime ends
[Token]
[Token] is a connection token used to authenticate yourself when making other requests
A connection token created by this path lasts 5 minutes before expiring
This response is the result of a missing token parameter in the input json
Token is required.
This response is the result of requesting to the endpoint with an invalid/expired token
Token is invalid.
'POST'
{"token":[Token]}
[Token] is expected to be a string value
Any valid connection token can be used
This response is the result of a successful request
[Key]
[Key] is the newly generated api key for the requested account
This response is the result of a missing token parameter in the input json
Token is required.
This response is the result of requesting to the endpoint with an invalid/expired token
Token is invalid.
This response is the result of an api key used in a request on an account that does not have api key enabled
[Username] does not have key enabled.
[Username] is the requested account username
'POST'
{"token":[Token]}
[Token] is expected to be a string value
Any valid connection token can be used
This response is the result of a successful request
This endpoint is temporary and was made solely for testing purposes
Successfully did stuff as [Username]
[Username] is the requested account's username
This response is the result of a missing token parameter in the input json
Token is required.
This response is the result of requesting to the endpoint with an invalid/expired token
Token is invalid.
Found an issue?
got any questions?
you can contact these contributors
Here is the Code of Conduct for this community!