ABOUT:
API Endpoint: apiv1.mentallystable4sure.dev Main Hosting: mentallystable4sure.dev Discord Troubleshoot Server: discord.gg/mentallystable4sure Corporate Mail: corp@mentallystable4sure.dev
Mentally Stable API provides access to latest news, constant stats, your account stats and basic data. Base timestamp limit is 2 second (can be higher depending on action). You cannot exceed that otherwise you could receive a timeout from API.
With that said, please, if you have any questions or you want to receive your own global API key contact us at corp@mentallystable4sure.dev instead of spamming the API. Or if you want much faster reply, tag @Iridium at our Discord Server. Any bugs encountered can be sent with role @MentallyStable into #bugs channel.
Get News list
To get all the news in the list you need to make a GET call to the following url:
https://apiv1.mentallystable4sure.dev/data/news.php
Response example :
[
{
"id": 2,
"title": "Hello world!",
"content": "We launched! Thats it ;)\r\nEveryone gets 69 pills",
"imageurl": "https:\/\/mentallystable4sure.dev\/img\/hello_world.png"
},
{
"id": 1,
"title": "Emotional rollercoaster!",
"content": "Days without refactoring: 0.\nWe need to focus..",
"imageurl": "https:\/\/mentallystable4sure.dev\/img\/launcher.png"
}
]
Get Products list
To get all the Mentally Stable 4 sure products list you need to make a GET call to the following url:
https://apiv1.mentallystable4sure.dev/data/products.php
Response example :
[
{
"id": 2,
"content": "Genshin Impact mini-games bot with rewards",
"title": "Eremite",
"link": "https:\/\/github.com\/MentallyStable4sure\/Eremite",
"imageasset": 1000002
},
{
"id": 1,
"content": "Monster-horror auto-battle with farm-sim elements",
"title": "Arachne Academy",
"link": "https:\/\/github.com\/MentallyStable4sure\/ArachneAcademy",
"imageasset": 1000001
}
]
Get Versions
To get the latest version of an app you need to make a GET call to the following url:
https://apiv1.mentallystable4sure.dev/data/versions/[PRODUCT_NAME].php
Response example :
{
"Major": 1,
"Minor": 3,
"SubMinor": 5
}
You can set any product name you want (if product has spaces it divides by a '-' sign), for example:
https://apiv1.mentallystable4sure.dev/data/versions/launcher.php
Version app list:
> launcher
> eremite-discord-bot
Get Account Data
To get your account data you need to make a POST call with following parameters to the following url:
https://apiv1.mentallystable4sure.dev/action/login.php
Request example :
{
"Email": "dev@msadmin.dev",
"Hash": "c854e99ff5f008a9d6eafa7aa8a7af2f7da1349c6a4a2a6c119e1d027d85a014631afcf6503c8a1d732c09152b239a0eee17c7c70da59ae9a4b2ad363c58d050"
}
Response example :
{
"UID": 100000000,
"Email": "dev@msadmin.dev",
"Inventory":
{
"100": {
"ItemType": 100,
"ItemID": 100,
"Amount": 0
},
"101": {
"ItemType": 101,
"ItemID": 101,
"Amount": 0
},
"102": {
"ItemType": 102,
"ItemID": 102,
"Amount": 0
},
"103": {
"ItemType": 103,
"ItemID": 103,
"Amount": 0
},
"3000": {
"ItemType": 3000,
"ItemID": 3000,
"Amount": 1
},
"1000": {
"ItemType": 1000,
"ItemID": 1000,
"Amount": 1
},
"1001": {
"ItemType": 1000,
"ItemID": 1001,
"Amount": 1
},
"1004": {
"ItemType": 1000,
"ItemID": 1004,
"Amount": 1
}
},
"Profile":
{
"Username":"clown",
"Status":"imagine having enemies",
"CurrentAvatar":1004
},
"Settings":
{
"IsHiddenMod":false,
"IsUsingFasterCache":true,
"ShouldAutoConnectDiscord":true,
"CurrentTheme":0,
"Token":"14A103E17BCE37BFE7C4670390BBD4560D74C18B56505C34219AA1F0677AA93341FE504FF323786CCEC88BD051134CC972D416A92208211790557F3ADD2B10B5",
"GlobalApiKey":"dev@msadmin.dev@$#tdSk(O@!K(0ksdioJ!*@(24"
},
"Mailbox":
[
{
"id": 1,
"Sender": "Mentally Stable 4 sure",
"content": "mslauncher.messages.welcome",
"ContainedItems":
[
{
"ItemType": 5000,
"ItemID": 5000,
"Amount": 1
}
],
"isNew": true
}
]
}
PARAMETERS
Field | Type | Description |
---|---|---|
String | Your email from registration which is linked to your account. | |
Hash | String | Your password hashed with SHA512 (you can use any generator). It can only grant you permission to view your own account. To get other information request global user-API key by mailing to us. |
Get Mailbox data
To get your entire mailbox which contains all the letters you first need to make a POST call with following parameters to the following url:
https://apiv1.mentallystable4sure.dev/data/mailbox.php
Request example :
{
"Email": "dev@msadmin.dev",
"Hash": "c854e99ff5f008a9d6eafa7aa8a7af2f7da1349c6a4a2a6c119e1d027d85a014631afcf6503c8a1d732c09152b239a0eee17c7c70da59ae9a4b2ad363c58d050",
"Token": "F72282035504D83CB84C0A8E135BA7CE76897EEB02702A082271FEDDE384AA80B34F79818D062D3B73FD7A308CBA727F55E9743D269BDA9110EE1EXAMPLEFBF9"
}
Response example :
[
{
"id": 1,
"Sender": "Mentally Stable 4 sure",
"content": "mslauncher.messages.welcome",
"ContainedItems":
[
{
"ItemType": 5000,
"ItemID": 5000,
"Amount": 1
}
],
"isNew": false
},
{
"id": 2,
"Sender": "Mentally Stable 4 sure",
"content": "mslauncher.messages.badge.collected",
"ContainedItems":
[
{
"ItemType": 3000,
"ItemID": 3004,
"Amount": 1
},
{
"ItemType": 104,
"ItemID": 104,
"Amount": 50
}
],
"isNew": true
}
]
PARAMETERS
Field | Type | Description |
---|---|---|
String | Your email from registration which is linked to your account. | |
Hash | String | Your password hashed with SHA512 (you can use any generator). It can only grant you permission to view your own account. To get other information request global user-API key by mailing to us. |
Token | String | Your token that you got from registration. If you dont know yours simply call get-data or just download JSON data from the launcher settings and take it from there. |
Edit Profile Data
To edit or setup your account profile you need to make a POST call with following parameters to the following url:
https://apiv1.mentallystable4sure.dev/action/edit.php
Request example :
{
"Email": "dev@msadmin.dev",
"Hash": "c854e99ff5f008a9d6eafa7aa8a7af2f7da1349c6a4a2a6c119e1d027d85a014631afcf6503c8a1d732c09152b239a0eee17c7c70da59ae9a4b2ad363c58d050",
"Token": "F72282035504D83CB84C0A8E135BA7CE76897EEB02702A082271FEDDE384AA80B34F79818D062D3B73FD7A308CBA727F55E9743D269BDA9110EE1EXAMPLEFBF9",
"Username": "bo77hi",
"Status": "taking pics on my brand new paranoid",
"CurrentAvatar": 6666
}
Response example :
{
"Username":"bo77hi",
"Status":"taking pics on my brand new paranoid",
"CurrentAvatar":6666
}
PARAMETERS
Field | Type | Description |
---|---|---|
String | Your email from registration which is linked to your account. | |
Hash | String | Your password hashed with SHA512 (you can use any generator). It can only grant you permission to view your own account. To get other information request global user-API key by mailing to us. |
Token | String | Your token that you got from registration. If you dont know yours simply call get-data or just download JSON data from the launcher settings and take it from there. |
Username | String | Public Username to set as your name in MS4S profile. |
Status | String | Public Status to set as your status below Username in MS4S profile. Just a note or anything funny will do, up to you. |
CurrentAvatar | Int | Public Avatar picture that shows alongside with Username in MS4S profile. You can only set avatars you own. |
Error Codes
Mentally Stable API uses custom error codes, here is some of them:
Error Code | Meaning |
---|---|
101 | Connection is not stable or routes have been changed. |
102 | Time limit is exceeded. Usually means that you are doing same action too fast. |
103 | Rate limit is exceeded. Usually means that you are trying same action too many times. |
104 | Token is exhausted/timed-out or hashing patterns aren't matching server patterns. If you'll keep getting this - regenerate your token as soon as possible. |
105 | Datatables update problem. Either tech problems on our side or high server load. The extreme rare case could be that chunk of data you are accessing already gone. |
106 |
Free tries exceeded. You got a timeout for 10 minutes from API for spamming.
|
201 | Endpoint not found or request missleaded to something unexpected. |
202 | Access is denied or request marked as risky. This error might appear if you use an unknow API key/knocking with expired data or trying to get data that you do not own my friend. |
203 |
Invalid credentials for this db/domain/server. Our endpoint did not found any match to proceed with the auth or request confirmation.
|
204 |
Invalid keys (such as user-key) and/or timestamps . Your timestamp watches future time, was spammed or keys are not being decoded right (double-check).
|
205 |
Action couldnt be proceed due to lack of data/currency/values . If thats an auth-type request check all the fields and values, they probably doesnt meet the requirements.
|
206 |
Action cannot be applied to this particular request/account/etc . Something is not prepared to be used this way, or is not in the work-field.
|
207 |
Duplicated request . Means you already did this, no need to do that again, also, try no to get banned with those my friend.
|
208 | Associated request already completed and cannot reach same endpoint anymore. (For example: bought product was already added to your account or item used was disposed) |
209 | Some parameters are missing that were expected on the server-side. This error appears when you don't pass every mandatory parameters or request constructed the wrong way. |
210 | Request was alright, chill. We just didnt found anything on the server side. Either data is wiped/Item destroyed or it will be there in future (list is empty for example). |
211 | Invalid parameters size. Length is either too low or too high. Or value is not in the expected boundaries. For example for "Current Avatar" you pass "9999999999" when expected 1000 or something like that. |