Mobile Logout

From docs
Jump to: navigation, search

Mobile_API »Logout

Base URL

https://apimobile.callproof.com

Endpoint

/api/logout

Purpose

Logs out the authenticated user by revoking their access tokens and optionally removing the device push-notification (FCM) token associated with the session.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

Parameter Type Required Description
fcm_token string No Device FCM token to remove from the user’s device log on logout

Request Body

None.

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/logout?fcm_token=YOUR_FCM_TOKEN' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/logout?fcm_token=YOUR_FCM_TOKEN' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

Successful Response (200)

Indicates that the user was logged out successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
message string Confirmation message (for example, "Logout Successful")
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – logout could not be completed
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while logging out.
  • 401 – Authentication failed or the access token is missing/expired.