Table of Contents
This API endpoint allows users to authenticate with their social media account (e.g. Facebook, Google) and log in to their Voomerr account.
Endpoint URL #
POST https://admin.voomerr.com/api/social_auth.php
Parameters #
The following parameters are required to successfully make a request to the API:
Parameter | Type | Required | Description |
---|---|---|---|
String | Yes | The email address associated with the social media account. | |
first_name | String | Yes | The user’s first name. |
image | String | Yes | The URL of the user’s profile picture. |
device_id | String | Yes | The unique identifier for the device used to log in. |
device_type | String | Yes | The type of device used to log in (e.g. “android”, “ios”, “web”). |
login_type | String | Yes | The type of login (e.g. “email”, “facebook”, “google”). |
currency | String | No | The user’s preferred currency. |
fcm_token | String | No | The Firebase Cloud Messaging token for the device used to log in. |
username | String | No | The user’s preferred username for their Voomerr account. |
Response #
The API will return a JSON object containing the following fields:
Field | Type | Description |
---|---|---|
success | Bool | Indicates whether the login attempt was successful. |
error_code | Int | The error code, if any. |
error_msg | String | A message describing the error, if any. |
user_id | Int | The ID of the user logging in, if the login attempt was successful. |
auth_token | String | An authentication token for the logged-in user, if successful. |
Example Request #
bash
POST https://admin.voomerr.com/api/social_auth.php
Content-Type: application/json
{
"email": "john.doe@example.com",
"first_name": "John",
"image": "https://example.com/profile.jpg",
"device_id": "123456789",
"device_type": "android",
"login_type": "facebook",
"currency": "USD",
"fcm_token": "abcde12345",
"username": "johndoe"
}
Example Response #
bash
HTTP/1.1 200 OK
Content-Type: application/json
{
"success": true,
"user_id": 123,
"auth_token": "ABCDEF123456"
}