curl -X POST https://api.gosentrix.io/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"user": {
"id": "user-123",
"email": "user@example.com",
"email_verified": true
}
}
Authentication API
Log In
Authenticate and obtain access tokens
POST
/
api
/
v1
/
auth
/
login
curl -X POST https://api.gosentrix.io/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"user": {
"id": "user-123",
"email": "user@example.com",
"email_verified": true
}
}
Authenticate with email and password to obtain access and refresh tokens.
curl -X POST https://api.gosentrix.io/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "SecurePassword123!"
}'
{
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refresh_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 900,
"user": {
"id": "user-123",
"email": "user@example.com",
"email_verified": true
}
}
Request Body
string
required
User email address
string
required
User password
Response
string
JWT access token (valid for 15 minutes)
string
JWT refresh token (valid for 7 days)
integer
Access token expiration time in seconds
object
User object with id, email, and verification status
Errors
object
Invalid credentials
object
Account locked or email not verified
object
Rate limit exceeded (too many login attempts)
Security Notes
- Failed login attempts are rate-limited
- MFA may be required if enabled
- See MFA Verify if MFA is enabled