Login
https://print-label.cloud/api/login
{
"email": "customer@example.com",
"password": "secret123"
}
fetch('https://print-label.cloud/api/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"email": "customer@example.com",
"password": "secret123"
})
})
.then(async (response) => {
const data = await response.json();
return { status: response.status, data };
})
.then(({ status, data }) => {
console.log('Status:', status);
console.log(data);
});
curl -X POST 'https://print-label.cloud/api/login' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "customer@example.com",
"password": "secret123"
}'
<?php
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('POST', 'https://print-label.cloud/api/login', [
'headers' => [
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'body' => '{
"email": "customer@example.com",
"password": "secret123"
}',
]);
echo $response->getBody()->getContents();
{
"token": "1|sanctum-token",
"token_type": "Bearer"
}