VerseOne API Docs
Authentication
Login
POST api/v1/login
Headers
Content-Type
Example: application/json
Accept
Example: application/json
Body Parameters
email string required
email. Must be a valid email address.
Example: [email protected]
password string required
Password. Must not be greater than 256 characters. Must include a lowercase letter, must include an uppercase letter, must include a special character (!@#$%^&*), and must include a number (0-9). Must not be greater than 256 characters.
Example: SecurePassword123!
Example Request
// JavaScript example
const url = new URL(
"http://verseone.test/api/v1/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "[email protected]",
"password": "securePassword123!"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'http://verseone.test/api/v1/login'
payload = {
"email": "[email protected]",
"password": "securePassword123!"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
<?php
$client = new \GuzzleHttp\Client();
$url = 'http://verseone.test/api/v1/login';
$response = $client->post(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'email' => '[email protected]',
'password' => 'securePassword123!',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
?>
curl --request POST \
"http://verseone.test/api/v1/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"[email protected]\",
\"password\": \"securePassword123!\"
}"
Example Response
{
"token": "21245|o47wta7pHIWzzDCyM2kUSVKiA79xtKlv2jViMmCH97bf0b5e"
}
{
"status": false,
"message": "Email & Password does not match with our record."
}