Apple User Login

From docs
Jump to: navigation, search

Mobile_API »Apple Login

Base URL

https://apimobile.callproof.com

Endpoint

/api/apple-login

Purpose

Authenticates an existing CallProof user through Sign in with Apple and provides authorized access to CallProof services.

Important: This API is exclusively for users signing in with an Apple account. Users authenticating through email and password, Google, or Microsoft should use the corresponding login API.

The Apple account email, including a recognized Apple private relay address, must be associated with an existing and active CallProof account.

HTTP Method

POST

Headers

Header Required Description
Content-Type Yes application/x-www-form-urlencoded

Security

  • No – No prior CallProof authentication is required. A valid Apple authorization code must be supplied.

Parameters

Request Body Fields

Parameter Type Required Description
token string Yes A valid authorization code received from Sign in with Apple.
email string No The user's original email address when Apple supplies a private relay email address.
version string No The version date associated with the Apple sign-in record. When omitted, the current date is used.
device_id_app string No The device notification token used for notifications and device recognition.
device_type string No The mobile platform. Recognized values are android and ios.
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 Apple identity was verified, matched to an eligible CallProof account, and authenticated access credentials were issued.

Response Field Type Description
clientStatusCode integer Business-level response status. A successful login returns 200.
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 CallProof API endpoints.
data.refresh_token string The credential used to obtain a new CallProof 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 email address associated with the authenticated CallProof account.
uri string The URL of the Apple login request.

Error Responses

Most Apple login failures are returned with HTTP status 200 and a clientStatusCode of 401. An HTTP 401 response may be returned when access cannot be authorized.

HTTP Status Code Client Status Code Meaning
200 401 The required Apple authorization code was not supplied.
200 401 The Apple authorization code is invalid, expired, or could not be exchanged successfully.
200 401 Apple did not provide a valid identity token or email address.
200 401 The Apple email does not match an existing CallProof account.
200 401 The user 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.
200 401 Device information could not be associated with the user.
401 401 The user could not be authorized to access CallProof.

Error Response Fields

Response Field Type Description
clientStatusCode integer The business-level error status, normally 401.
error.code integer The business error code, generally 1500.
error.message string A plain-language explanation of the Apple login failure.
uri string The URL of the Apple login request.