cURL
curl --request POST \ --url https://api.bunship.com/api/v1/auth/login \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "password": "<string>", "twoFactorCode": "<string>" } '
{ "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expiresIn": 900, "user": { "id": "usr_cld2abc123def456", "email": "[email protected]", "fullName": "John Doe" } }
Authenticate with email and password
twoFactorCode
401
AUTHENTICATION_ERROR
{ "success": false, "error": { "code": "AUTHENTICATION_ERROR", "message": "Invalid email or password" } }
curl -X POST https://api.bunship.com/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "SecureP@ssw0rd" }'
curl -X POST https://api.bunship.com/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "SecureP@ssw0rd", "twoFactorCode": "123456" }'