Base URL
Authentication
Phone-based authentication with OTP verification.Response Format
Success:Features
- Phone-based authentication
- OTP verification (SMS)
- User profile management
- Bearer token auth
- Mobile-optimized responses
✨ The Urban Management docs now have a brand-new home! Explore the improved documentation experience
Get started with Mobile Backend API
http://localhost:3002/api/v1
# Step 1: Sign in with phone
curl -X POST http://localhost:3002/api/v1/auth/signin \
-H "Content-Type: application/json" \
-d '{"phoneNumber":"+1234567890"}'
# Step 2: Create OTP (use accessToken from step 1)
curl -X POST http://localhost:3002/api/v1/auth/otp/create \
-H "Authorization: Bearer ACCESS_TOKEN"
# Step 3: Validate OTP
curl -X POST http://localhost:3002/api/v1/auth/otp/validate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-d '{"otp":"123456"}'
{
"success": true,
"data": { ... }
}
{
"success": false,
"error": {
"message": "Error message",
"code": "ERROR_CODE"
}
}
const apiClient = axios.create({
baseURL: 'http://localhost:3002/api/v1',
headers: { 'Content-Type': 'application/json' }
});
// Add token interceptor
apiClient.interceptors.request.use((config) => {
const token = await AsyncStorage.getItem('sessionToken');
if (token) config.headers.Authorization = `Bearer ${token}`;
return config;
});
Was this page helpful?