|
|
| Line 1: |
Line 1: |
| − | == User Login == | + | = CallProof Mobile API = |
| | | | |
| − | === Base URL ===
| + | The '''CallProof Mobile API''' provides the backend services used by the CallProof Mobile Application on both '''iOS''' and '''Android'''. It enables secure communication between the mobile applications and the CallProof platform for authentication, user management, contacts, tasks, routes, visits, and other mobile features. |
| − | https://apimobile.callproof.com
| |
| | | | |
| − | === Endpoint === | + | == Authentication == |
| − | /api/login
| |
| | | | |
| − | === Purpose === | + | === User Login === |
| − | Authenticates a registered user, verifies that the user and company accounts are active, and provides access credentials for authorized CallProof services. The request may also include mobile-device information used for notifications, device recognition, and account preferences.
| + | Allows a mobile user to authenticate and obtain access to the CallProof Mobile API. |
| | | | |
| − | === HTTP Method ===
| + | * [[Mobile User Login|User Login]] |
| − | POST
| |
| − | | |
| − | === Headers ===
| |
| − | {| class="wikitable"
| |
| − | ! Header !! Required !! Description
| |
| − | |-
| |
| − | | Content-Type || Yes || application/x-www-form-urlencoded
| |
| − | |}
| |
| − | | |
| − | === Security ===
| |
| − | * '''No''' – No prior authentication is required. Valid user credentials must be supplied in the request body. | |
| − | | |
| − | === Parameters ===
| |
| − | ==== Request Body Fields ====
| |
| − | {| class="wikitable"
| |
| − | ! Parameter !! Type !! Required !! Description
| |
| − | |-
| |
| − | | email || string || Yes || The user's registered email address. Email matching is case-insensitive.
| |
| − | |-
| |
| − | | password || string || Yes || The user's account password.
| |
| − | |-
| |
| − | | device_id_app || string || No || The mobile device notification token used to associate the device with the user's account.
| |
| − | |-
| |
| − | | device_type || string || No || The mobile device platform. Recognized values are <code>android</code> and <code>ios</code>.
| |
| − | |-
| |
| − | | device_phone_number || string || No || The phone number associated with the mobile device.
| |
| − | |-
| |
| − | | device_time_zone || string || No || The device's time zone. When omitted, a time zone may be determined automatically.
| |
| − | |-
| |
| − | | cp_version || string || No || The installed CallProof application version.
| |
| − | |-
| |
| − | | product || string || No || The device product or model identifier.
| |
| − | |-
| |
| − | | resolution || string || No || The device screen resolution.
| |
| − | |-
| |
| − | | device_name || string || No || The user-visible device name.
| |
| − | |-
| |
| − | | is_tablet || boolean || No || Indicates whether the device is a tablet.
| |
| − | |-
| |
| − | | android_version || string || No || The Android operating-system version.
| |
| − | |-
| |
| − | | android_api_version || string || No || The Android API version.
| |
| − | |-
| |
| − | | android_apk_version || string || No || The installed Android application package version.
| |
| − | |-
| |
| − | | is_callLog_build || boolean || No || Indicates whether the Android application supports call-log capabilities.
| |
| − | |-
| |
| − | | ios_version || string || No || The iOS operating-system version.
| |
| − | |}
| |
| − | | |
| − | === Successful Response (200) ===
| |
| − | The user was authenticated successfully and receives access credentials together with two-factor authentication status information.
| |
| − | | |
| − | {| class="wikitable"
| |
| − | ! Response Field !! Type !! Description
| |
| − | |-
| |
| − | | clientStatusCode || integer || Business-level response status. A successful login returns <code>200</code>.
| |
| − | |-
| |
| − | | data.token_type || string || The authentication token type.
| |
| − | |-
| |
| − | | data.expires_in || integer || The access token validity period.
| |
| − | |-
| |
| − | | data.access_token || string || The credential used to access authenticated API endpoints.
| |
| − | |-
| |
| − | | data.refresh_token || string || The credential used to obtain a new access token.
| |
| − | |-
| |
| − | | data.is_2fa_enabled || boolean || Indicates whether two-factor authentication is enabled for the user or company.
| |
| − | |-
| |
| − | | data.is_verified || boolean || Indicates whether the applicable two-factor authentication requirement has been satisfied.
| |
| − | |-
| |
| − | | data.email || string || The authenticated user's email address.
| |
| − | |-
| |
| − | | uri || string || The URL of the login request.
| |
| − | |}
| |
| − | | |
| − | === Error Responses ===
| |
| − | Authentication-related failures are returned with HTTP status <code>200</code>, while <code>clientStatusCode</code> in the response body is set to <code>401</code>.
| |
| − | | |
| − | {| class="wikitable"
| |
| − | ! HTTP Status Code !! Client Status Code !! Meaning
| |
| − | |-
| |
| − | | 200 || 401 || The email and password combination is invalid.
| |
| − | |-
| |
| − | | 200 || 401 || The user account or associated company account is disabled.
| |
| − | |-
| |
| − | | 200 || 401 || The account is not eligible for this type of access and must be updated through CallProof Support.
| |
| − | |}
| |
| − | | |
| − | ==== Error Response Fields ====
| |
| − | {| class="wikitable"
| |
| − | ! Response Field !! Type !! Description
| |
| − | |-
| |
| − | | clientStatusCode || integer || The business-level error status. Authentication failures return <code>401</code>.
| |
| − | |-
| |
| − | | error.code || integer || The business error code. Authentication failures generally return <code>1500</code>.
| |
| − | |-
| |
| − | | error.message || string || A plain-language explanation of the login failure.
| |
| − | |-
| |
| − | | uri || string || The URL of the login request.
| |
| − | |} | |