Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST 'https://api.weir.ai/auth/login' \ -H 'Content-Type: application/json' \ -d '{ "username": "admin@weir.ai", "password": "SecureAdminPass123!" }'
{ "data": { "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "admin_refresh_123456789", "expiresIn": 3600, "user": { "id": "admin_123456789", "fullname": "Admin User", "email": "admin@weir.ai", "role": "Super_Admin" } }, "message": "Login successful", "status": "success" }
Admin user login with username and password
const adminLogin = async (username, password) => { const response = await fetch('https://api.weir.ai/auth/login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ username, password }) }); if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`); return await response.json(); };
Was this page helpful?