Authentication & account
Login & generate token
/api/login
Exchange your account email and password for a Bearer token (Laravel Sanctum). Send the token with every other request.
Request · illustrative example
cURL
curl -X POST "https://connect.vivape.eu/api/login" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"email": "dev@yourcompany.com",
"password": "your-password"
}'
PHP
<?php
use Illuminate\Support\Facades\Http;
$response = Http::acceptJson()
->post('https://connect.vivape.eu/api/login', [
'email' => 'dev@yourcompany.com',
'password' => 'your-password',
]);
$data = $response->throw()->json();
JavaScript
const response = await fetch('https://connect.vivape.eu/api/login', {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"email": "dev@yourcompany.com",
"password": "your-password"
}),
});
const data = await response.json();
Python
import os
import requests
response = requests.request(
"POST",
"https://connect.vivape.eu/api/login",
headers={
"Accept": "application/json",
},
json={
"email": "dev@yourcompany.com",
"password": "your-password"
},
timeout=30,
)
response.raise_for_status()
data = response.json()
Response · 200, illustrative
{
"status": "Success",
"token": "1|aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"token_type": "Bearer"
}