Account management
Creation
Create a new account
POST https://api.naxalian.fr/accounts/create.php
Request Body
nametag*
String
mail*
String
password*
String
{
"code" => 200,
"id" => {Random ID generated}
}Generate a token
POST https://api.naxalian.fr/accounts/login.php
Generates a valid token for 24 hours
Request Body
userCredential*
String
It can be an id, a nametag or a mail
password*
String
Without hash or encoding
{
"code" => 200,
"userCredential" => {account id},
"token" => {token}
}{
"code" => 500,
"message" => {description}
}{
// Response
}Deletions
Delete an existing token
POST https://api.naxalian.fr/accounts/tokenDelete.php
Request Body
token
String
A 64 characters long token
{
"code" => 200,
"message" => "Token deleted"
}{
"code" => 500,
"message" => "Internal server error"
}{
"code" => 400,
"message" => {description}
}Delete an account
DELETE https://api.naxalian.fr/accounts/accountDelete.php
Request Body
token*
String
userCredential*
String
It can be an id, a nametag or a mail
{
"code" => 200,
"message" => "Account deleted"
}{
"code" => 500,
"message" => "Internal server error"
}{
"code" => 400,
"message" => "Internal server error"
}Be careful !
This request delete the account and all the informations without any verification ! There is no way back !
Informations
Get informations on a user's account from a token
GET https://api.naxalian.fr/accounts/getUserinfoFromToken.php
Request Body
token*
String
{
"code" => 200,
"message" => "User info",
"data" => [
"id" => {info},
"nametag" => {info},
"mail" => {info},
"rank" => {info},
"created_at" => {info}
}{
// Response
}{
"code" => 400,
"message" => {description}
}Update account's informations
POST https://api.naxalian.fr/accounts/updateUserinfo.php
Headers
Authorization*
String
Your token
Request Body
nametag
String
New nametag
String
New mail
{
"code" => 200,
"message" => "Account edited"
}{
"code" => 400,
"message" => {description}
}{
"code" => 500,
"message" => {description}
}Update password
POST https://api.naxalian.fr/accounts/updatePassword.php
Headers
Authorization*
String
Your token
Request Body
oldPassword*
Current password
newPassword*
String
New password
{
"code": 200,
"message": "Password edited"
}{
"code": 400,
"message": {description}
}{
"code": 500,
"message": {description}
}Get all active sessions informations
GET https://api.naxalian.fr/accounts/getSessions.php
Headers
Authorization*
String
Your token
Request Body
String
{
"code" => 200,
"message" => "Sessions list",
"data" => {session_list}
}{
"code" => 204,
"message" => "No sessions found"
}{
"code" => 400,
"message" => {description}
}{
"code" => 500,
"message" => {description}
}Last updated