LoginRadius PHP wrapper provides access to LoginRadius.
LoginRadius is a unified Customer Identity Management API platform that combines over 30 major social platforms into a single simplified and maintenance-free API. With LoginRadius' API, websites and mobile apps can implement capture user profile data, enable social login, enable social sharing, add single sign-on and many more.
LoginRadius helps businesses boost user engagement on their web/mobile platform, manage online identities, utilize social media for marketing, capture accurate consumer data and get unique social insight into their customer base.
Disclaimer
>This library is meant to help you with a quick implementation of the LoginRadius platform and also to serve as a reference point for the LoginRadius API. Keep in mind that it is an open source library, which means you are always free to download and customize the library functions based on your specific application needs.
The recommended and the usual way to install is through Composer.
# Install Composer
curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of library:
composer require loginradius/php-sdk:11.0.0
Include the following files in your Project Directory
require_once "src/LoginRadiusSDK/Utility/Functions.php";
require_once "src/LoginRadiusSDK/LoginRadiusException.php";
require_once "src/LoginRadiusSDK/Clients/IHttpClientInterface.php";
require_once "src/LoginRadiusSDK/Clients/DefaultHttpClient.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/AuthenticationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/OneTouchLoginAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/PasswordLessLoginAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/PhoneAuthenticationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/PINAuthenticationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/RiskBasedAuthenticationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Authentication/SmartLoginAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Account/AccountAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Account/RoleAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Account/SottAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/ConfigurationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/ConsentManagementAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/CustomObjectAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/CustomRegistrationDataAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/MultiFactorAuthenticationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/ReAuthenticationAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Advanced/WebHookAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Social/NativeSocialAPI.php";
require_once "src/LoginRadiusSDK/CustomerRegistration/Social/SocialAPI.php";
Modify the config.php file in the SDK to include your LoginRadius Credentials
After successful install, you need to define the following LoginRadius Account info in your project anywhere before using the LoginRadius SDK or in the config file of your project:
define('APP_NAME', 'LOGINRADIUS_SITE_NAME_HERE'); // Replace LOGINRADIUS_SITE_NAME_HERE with your site name that provide in LoginRadius account.
define('LR_API_KEY', 'LOGINRADIUS_API_KEY_HERE'); // Replace LOGINRADIUS_API_KEY_HERE with your site API key that provide in LoginRadius account.
define('LR_API_SECRET', 'LOGINRADIUS_API_SECRET_HERE'); // Replace LOGINRADIUS_API_SECRET_HERE with your site Secret key that provide in LoginRadius account.
define('API_REQUEST_SIGNING', ''); // Pass boolean true if this option is enabled on you app.
define('API_REGION', ''); // Pass APi Region for your app
define('PROTOCOL', 'PROXY_PROTOCOL'); // Replace PROXY_PROTOCOL with your proxy server protocoal ie http or https.
define('HOST', 'PROXY_HOST'); // Replace PROXY_HOST with your proxy server host.
define('PORT', 'PROXY_PORT'); // Replace PROXY_PORT with your proxy server port.
define('USER', 'PROXY_USER'); // Replace PROXY_USER with your proxy server username.
define('PASSWORD', 'PROXY_PASSWORD'); // Replace PROXY_PASSWORD with your proxy server password.
define('API_DOMAIN', 'DEFINE_CUSTOM_API_DOMAIN'); // Custom API Domain
Replace 'LOGINRADIUS_SITE_NAME_HERE', 'LOGINRADIUS_API_KEY_HERE' and 'LOGINRADIUS_API_SECRET_HERE' in the above code with your LoginRadius Site Name, LoginRadius API Key, and Secret which you can get here.
API Request Signing:- define('API_REQUEST_SIGNING', true); When initializing the SDK, you can optionally specify enabling this feature. Enabling this feature means that the customer does not need to pass an API secret in an API request. Instead, they can pass a dynamically generated hash value. This feature will also make sure that the message is not tampered during transit when someone calls our APIs.
Pass the proxy configurations if you want to set Http Server Proxy Configuration through your PHP SDK. Protocol, Host and port are required to set Http Server Proxy configuration (username and password are optional).
If you have Custom API Domain then define 'API_DOMAIN' then replaced it with your custom API domain, Otherwise no need to define this option in configuration.
Importing/aliasing with the use operator.
use \LoginRadiusSDK\Utility\Functions;
use \LoginRadiusSDK\LoginRadiusException;
use \LoginRadiusSDK\Clients\IHttpClientInterface;
use \LoginRadiusSDK\Clients\DefaultHttpClient;
use \LoginRadiusSDK\CustomerRegistration\Account\AccountAPI;
use \LoginRadiusSDK\CustomerRegistration\Account\RoleAPI;
use \LoginRadiusSDK\CustomerRegistration\Account\SottAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\ConfigurationAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\ConsentManagementAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\CustomObjectAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\CustomRegistrationDataAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\MultiFactorAuthenticationAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\ReAuthenticationAPI;
use \LoginRadiusSDK\CustomerRegistration\Advanced\WebHookAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\AuthenticationAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\OneTouchLoginAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\PasswordLessLoginAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\PhoneAuthenticationAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\PINAuthenticationAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\RiskBasedAuthenticationAPI;
use \LoginRadiusSDK\CustomerRegistration\Authentication\SmartLoginAPI;
use \LoginRadiusSDK\CustomerRegistration\Social\SocialAPI;
use \LoginRadiusSDK\CustomerRegistration\Social\NativeSocialAPI;
Create a LoginRadius object :
$accountObject = new AccountAPI();
We have an option to select fields(partial response) which you require as an API response.
For this, you need to pass an extra parameter(optional) at the end of each API function.
- If any field passed does not exist in response, will be ignored.
- In case of nested, only root object is selectable.
- Values should be separated by the comma.
Example:
$fields= "email, username";
$email = 'xxxxxr@xxxxx.com';
$result = $accountObject->accountProfileByEmail($email,$fields);
Output Response:
{
UserName: 'test1213',
Email: [ { Type: 'Primary', Value: 'test1213@sthus.com' } ]
}
List of APIs in this Section:
PUT : Auth Update Profile by Token
PUT : Auth Unlock Account by Access Token
PUT : Auth Verify Email By OTP
PUT : Auth Reset Password by Security Answer and Email
PUT : Auth Reset Password by Security Answer and Phone
PUT : Auth Reset Password by Security Answer and UserName
PUT : Auth Reset Password by Reset Token
PUT : Auth Reset Password by OTP
PUT : Auth Reset Password by OTP and UserName
PUT : Auth Change Password
PUT : Auth Set or Change UserName
PUT : Auth Resend Email Verification
POST : Auth Add Email
POST : Auth Login by Email
POST : Auth Login by Username
POST : Auth Forgot Password
POST : Auth Link Social Identities
POST : Auth Link Social Identities By Ping
POST : Auth User Registration by Email
POST : Auth User Registration By Captcha
GET : Get Security Questions By Email
GET : Get Security Questions By UserName
GET : Get Security Questions By Phone
GET : Get Security Questions By Access Token
GET : Auth Validate Access token
GET : Access Token Invalidate
GET : Access Token Info
GET : Auth Read all Profiles by Token
GET : Auth Send Welcome Email
GET : Auth Delete Account
GET : Auth Check Email Availability
GET : Auth Verify Email
GET : Auth Check UserName Availability
GET : Auth Privacy Policy Accept
GET : Auth Privacy Policy History By Access Token
DELETE : Auth Delete Account with Email Confirmation
DELETE : Auth Remove Email
DELETE : Auth Unlink Social Identities
If you have not already initialized the Authentication object do so now
$authenticationAPI = new AuthenticationAPI();
$access_token = "access_token"; //Required
$payload = '{
"firstName" : "<firstName>",
"lastName" : "<lastName>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$nullSupport = "true"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $authenticationAPI->updateProfileByAccessToken($access_token,$payload,$emailTemplate,$fields,$nullSupport,$smsTemplate,$verificationUrl);
$access_token = "access_token"; //Required
$payload = '{
"g-recaptcha-response" : "<g-recaptcha-response>"
}'; //Required
$result = $authenticationAPI->unlockAccountByToken($access_token,$payload);
$payload = '{
"email" : "<email>",
"otp" : "<otp>"
}'; //Required
$fields = null; //Optional
$url = "url"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $authenticationAPI->verifyEmailByOTP($payload,$fields,$url,$welcomeEmailTemplate);
$payload = '{
"email" : "<email>",
"password" : "<password>",
"securityAnswer" : {"QuestionID":"Answer"}
}'; //Required
$result = $authenticationAPI->resetPasswordBySecurityAnswerAndEmail($payload);
$payload = '{
"password" : "<password>",
"phone" : "<phone>",
"securityAnswer" : {"QuestionID":"Answer"}
}'; //Required
$result = $authenticationAPI->resetPasswordBySecurityAnswerAndPhone($payload);
$payload = '{
"password" : "<password>",
"securityAnswer" : {"QuestionID":"Answer"},
"userName" : "<userName>"
}'; //Required
$result = $authenticationAPI->resetPasswordBySecurityAnswerAndUserName($payload);
$payload = '{
"password" : "<password>",
"resetToken" : "<resetToken>"
}'; //Required
$result = $authenticationAPI->resetPasswordByResetToken($payload);
$payload = '{
"email" : "<email>",
"otp" : "<otp>",
"password" : "<password>"
}'; //Required
$result = $authenticationAPI->resetPasswordByEmailOTP($payload);
$payload = '{
"otp" : "<otp>",
"password" : "<password>",
"userName" : "<userName>"
}'; //Required
$result = $authenticationAPI->resetPasswordByOTPAndUserName($payload);
$access_token = "access_token"; //Required
$newPassword = "newPassword"; //Required
$oldPassword = "oldPassword"; //Required
$result = $authenticationAPI->changePassword($access_token,$newPassword,$oldPassword);
$access_token = "access_token"; //Required
$username = "username"; //Required
$result = $authenticationAPI->setOrChangeUserName($access_token,$username);
$email = "email"; //Required
$emailTemplate = "emailTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $authenticationAPI->authResendEmailVerification($email,$emailTemplate,$verificationUrl);
$access_token = "access_token"; //Required
$email = "email"; //Required
$type = "type"; //Required
$emailTemplate = "emailTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $authenticationAPI->addEmail($access_token,$email,$type,$emailTemplate,$verificationUrl);
$payload = '{
"email" : "<email>",
"password" : "<password>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $authenticationAPI->loginByEmail($payload,$emailTemplate,$fields,$loginUrl,$verificationUrl);
$payload = '{
"password" : "<password>",
"username" : "<username>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $authenticationAPI->loginByUserName($payload,$emailTemplate,$fields,$loginUrl,$verificationUrl);
$email = "email"; //Required
$resetPasswordUrl = "resetPasswordUrl"; //Required
$emailTemplate = "emailTemplate"; //Optional
$result = $authenticationAPI->forgotPassword($email,$resetPasswordUrl,$emailTemplate);
$access_token = "access_token"; //Required
$candidateToken = "candidateToken"; //Required
$result = $authenticationAPI->linkSocialIdentities($access_token,$candidateToken);
$access_token = "access_token"; //Required
$clientGuid = "clientGuid"; //Required
$result = $authenticationAPI->linkSocialIdentitiesByPing($access_token,$clientGuid);
$payload = '{
"email" : [ {
"type" : "<type>" ,
"value" : "<value>"
} ] ,
"firstName" : "<firstName>",
"lastName" : "<lastName>",
"password" : "<password>"
}'; //Required
$sott = "sott"; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$options = "options"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $authenticationAPI->userRegistrationByEmail($payload,$sott,$emailTemplate,$fields,$options,$verificationUrl,$welcomeEmailTemplate);
$payload = '{
"email" : [ {
"type" : "<type>" ,
"value" : "<value>"
} ] ,
"firstName" : "<firstName>",
"g-recaptcha-response" : "<g-recaptcha-response>",
"lastName" : "<lastName>",
"password" : "<password>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$options = "options"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $authenticationAPI->userRegistrationByCaptcha($payload,$emailTemplate,$fields,$options,$smsTemplate,$verificationUrl,$welcomeEmailTemplate);
$email = "email"; //Required
$result = $authenticationAPI->getSecurityQuestionsByEmail($email);
$userName = "userName"; //Required
$result = $authenticationAPI->getSecurityQuestionsByUserName($userName);
$phone = "phone"; //Required
$result = $authenticationAPI->getSecurityQuestionsByPhone($phone);
$access_token = "access_token"; //Required
$result = $authenticationAPI->getSecurityQuestionsByAccessToken($access_token);
$access_token = "access_token"; //Required
$result = $authenticationAPI->authValidateAccessToken($access_token);
$access_token = "access_token"; //Required
$preventRefresh = "true"; //Optional
$result = $authenticationAPI->authInValidateAccessToken($access_token,$preventRefresh);
$access_token = "access_token"; //Required
$result = $authenticationAPI->getAccessTokenInfo($access_token);
$access_token = "access_token"; //Required
$fields = null; //Optional
$result = $authenticationAPI->getProfileByAccessToken($access_token,$fields);
$access_token = "access_token"; //Required
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $authenticationAPI->sendWelcomeEmail($access_token,$welcomeEmailTemplate);
$deletetoken = "deletetoken"; //Required
$result = $authenticationAPI->deleteAccountByDeleteToken($deletetoken);
$email = "email"; //Required
$result = $authenticationAPI->checkEmailAvailability($email);
$verificationToken = "verificationToken"; //Required
$fields = null; //Optional
$url = "url"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $authenticationAPI->verifyEmail($verificationToken,$fields,$url,$welcomeEmailTemplate);
$username = "username"; //Required
$result = $authenticationAPI->checkUserNameAvailability($username);
$access_token = "access_token"; //Required
$fields = null; //Optional
$result = $authenticationAPI->acceptPrivacyPolicy($access_token,$fields);
$access_token = "access_token"; //Required
$result = $authenticationAPI->getPrivacyPolicyHistoryByAccessToken($access_token);
$access_token = "access_token"; //Required
$deleteUrl = "deleteUrl"; //Optional
$emailTemplate = "emailTemplate"; //Optional
$result = $authenticationAPI->deleteAccountWithEmailConfirmation($access_token,$deleteUrl,$emailTemplate);
$access_token = "access_token"; //Required
$email = "email"; //Required
$result = $authenticationAPI->removeEmail($access_token,$email);
$access_token = "access_token"; //Required
$provider = "provider"; //Required
$providerId = "providerId"; //Required
$result = $authenticationAPI->unlinkSocialIdentities($access_token,$provider,$providerId);
List of APIs in this Section:
PUT : Account Update
PUT : Update Phone ID by UID
PUT : Account Set Password
PUT : Account Invalidate Verification Email
PUT : Reset phone ID verification
PUT : Upsert Email
POST : Account Create
POST : Forgot Password token
POST : Email Verification token
GET : Get Privacy Policy History By Uid
GET : Account Profiles by Email
GET : Account Profiles by Username
GET : Account Profile by Phone ID
GET : Account Profiles by UID
GET : Account Password
GET : Access Token based on UID or User impersonation API
GET : Refresh Access Token by Refresh Token
GET : Revoke Refresh Token
GET : Account Identities by Email
DELETE : Account Delete
DELETE : Account Remove Email
DELETE : Delete User Profiles By Email
If you have not already initialized the Account object do so now
$accountAPI = new AccountAPI();
$payload = '{
"firstName" : "<firstName>",
"lastName" : "<lastName>"
}'; //Required
$uid = "uid"; //Required
$fields = null; //Optional
$nullSupport = "true"; //Optional
$result = $accountAPI->updateAccountByUid($payload,$uid,$fields,$nullSupport);
$phone = "phone"; //Required
$uid = "uid"; //Required
$fields = null; //Optional
$result = $accountAPI->updatePhoneIDByUid($phone,$uid,$fields);
$password = "password"; //Required
$uid = "uid"; //Required
$result = $accountAPI->setAccountPasswordByUid($password,$uid);
$uid = "uid"; //Required
$emailTemplate = "emailTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $accountAPI->invalidateAccountEmailVerification($uid,$emailTemplate,$verificationUrl);
$uid = "uid"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $accountAPI->resetPhoneIDVerificationByUid($uid,$smsTemplate);
$payload = '{
"email" : [ {
"type" : "<type>" ,
"value" : "<value>"
} ]
}'; //Required
$uid = "uid"; //Required
$fields = null; //Optional
$result = $accountAPI->upsertEmail($payload,$uid,$fields);
In order to use this API, you need to format a JSON request body with all of the mandatory fields [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/account/account-create)
$payload = '{
"email" : [ {
"type" : "<type>" ,
"value" : "<value>"
} ] ,
"firstName" : "<firstName>",
"lastName" : "<lastName>",
"password" : "<password>"
}'; //Required
$fields = null; //Optional
$result = $accountAPI->createAccount($payload,$fields);
$email = "email"; //Required
$emailTemplate = "emailTemplate"; //Optional
$resetPasswordUrl = "resetPasswordUrl"; //Optional
$sendEmail = "true"; //Optional
$result = $accountAPI->getForgotPasswordToken($email,$emailTemplate,$resetPasswordUrl,$sendEmail);
$email = "email"; //Required
$result = $accountAPI->getEmailVerificationToken($email);
$uid = "uid"; //Required
$result = $accountAPI->getPrivacyPolicyHistoryByUid($uid);
$email = "email"; //Required
$fields = null; //Optional
$result = $accountAPI->getAccountProfileByEmail($email,$fields);
$userName = "userName"; //Required
$fields = null; //Optional
$result = $accountAPI->getAccountProfileByUserName($userName,$fields);
$phone = "phone"; //Required
$fields = null; //Optional
$result = $accountAPI->getAccountProfileByPhone($phone,$fields);
$uid = "uid"; //Required
$fields = null; //Optional
$result = $accountAPI->getAccountProfileByUid($uid,$fields);
$uid = "uid"; //Required
$result = $accountAPI->getAccountPasswordHashByUid($uid);
$uid = "uid"; //Required
$result = $accountAPI->getAccessTokenByUid($uid);
$refresh_Token = "refresh_Token"; //Required
$result = $accountAPI->refreshAccessTokenByRefreshToken($refresh_Token);
$refresh_Token = "refresh_Token"; //Required
$result = $accountAPI->revokeRefreshToken($refresh_Token);
$email = "email"; //Required
$fields = null; //Optional
$result = $accountAPI->getAccountIdentitiesByEmail($email,$fields);
$uid = "uid"; //Required
$result = $accountAPI->deleteAccountByUid($uid);
$email = "email"; //Required
$uid = "uid"; //Required
$fields = null; //Optional
$result = $accountAPI->removeEmail($email,$uid,$fields);
$email = "email"; //Required
$result = $accountAPI->accountDeleteByEmail($email);
List of APIs in this Section:
POST : Post Message API
POST : Status Posting
POST : Trackable Status Posting
GET : Access Token
GET : Refresh Token
GET : Token Validate
GET : Access Token Invalidate
GET : Get Active Session Details
GET : Get Active Session By Account Id
GET : Get Active Session By Profile Id
GET : Album
GET : Get Albums with cursor
GET : Audio
GET : Get Audio With Cursor
GET : Check In
GET : Get CheckIns With Cursor
GET : Contact
GET : Event
GET : Get Events With Cursor
GET : Following
GET : Get Followings With Cursor
GET : Group
GET : Get Groups With Cursor
GET : Like
GET : Get Likes With Cursor
GET : Mention
GET : Page
GET : Photo
GET : Get Post
GET : Get Trackable Status Stats
GET : Trackable Status Fetching
GET : User Profile
GET : Refresh User Profile
GET : Video
If you have not already initialized the Social object do so now
$socialAPI = new SocialAPI();
Supported Providers: Twitter, LinkedIn
The Message API is used to post messages to the user?s contacts. This is one of the APIs that makes up the LoginRadius Friend Invite System. After using the Contact API, you can send messages to the retrieved contacts. This API requires setting permissions in your LoginRadius Dashboard.
GET & POST Message API work the same way except the API method is different [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post-message-api)
$access_Token = "access_Token"; //Required
$message = "message"; //Required
$subject = "subject"; //Required
$to = "to"; //Required
$result = $socialAPI->postMessage($access_Token,$message,$subject,$to);
Supported Providers: Facebook, Twitter, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/status-posting/)
$access_Token = "access_Token"; //Required
$caption = "caption"; //Required
$description = "description"; //Required
$imageurl = "imageurl"; //Required
$status = "status"; //Required
$title = "title"; //Required
$url = "url"; //Required
$shorturl = "shorturl"; //Optional
$result = $socialAPI->statusPosting($access_Token,$caption,$description,$imageurl,$status,$title,$url,$shorturl);
The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications.
POST Input Parameter Format: application/x-www-form-urlencoded [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/trackable-status-posting/)
$access_Token = "access_Token"; //Required
$payload = '{
"caption" : "<caption>",
"description" : "<description>",
"imageurl" : "<imageurl>",
"status" : "<status>",
"title" : "<title>",
"url" : "<url>"
}'; //Required
$result = $socialAPI->trackableStatusPosting($access_Token,$payload);
$token = "token"; //Required
$result = $socialAPI->exchangeAccessToken($token);
Supported Providers : Facebook,Yahoo,Google,Twitter, Linkedin.
Contact LoginRadius support team to enable this API. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/refresh-token/refresh-token)
$access_Token = "access_Token"; //Required
$expiresIn = 0; //Optional
$isWeb = "true"; //Optional
$result = $socialAPI->refreshAccessToken($access_Token,$expiresIn,$isWeb);
$access_token = "access_token"; //Required
$result = $socialAPI->validateAccessToken($access_token);
$access_token = "access_token"; //Required
$result = $socialAPI->inValidateAccessToken($access_token);
$token = "token"; //Required
$result = $socialAPI->getActiveSession($token);
$accountId = "accountId"; //Required
$result = $socialAPI->getActiveSessionByAccountID($accountId);
$profileId = "profileId"; //Required
$result = $socialAPI->getActiveSessionByProfileID($profileId);
This API returns the photo albums associated with the passed in access tokens Social Profile. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/album/)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getAlbums($access_Token);
This API returns the photo albums associated with the passed in access tokens Social Profile. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/album/)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getAlbumsWithCursor($access_Token,$nextCursor);
Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getAudios($access_Token);
Supported Providers: Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/audio)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getAudiosWithCursor($access_Token,$nextCursor);
Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getCheckIns($access_Token);
Supported Providers: Facebook, Foursquare, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/check-in)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getCheckInsWithCursor($access_Token,$nextCursor);
Note: Facebook restricts access to the list of friends that is returned. When using the Contacts API with Facebook you will only receive friends that have accepted some permissions with your app.
Supported Providers: Facebook, Foursquare, Google, LinkedIn, Live, Twitter, Vkontakte, Yahoo [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/contact)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Optional
$result = $socialAPI->getContacts($access_Token,$nextCursor);
Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getEvents($access_Token);
Supported Providers: Facebook, Live [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/event)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getEventsWithCursor($access_Token,$nextCursor);
Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getFollowings($access_Token);
Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/following)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getFollowingsWithCursor($access_Token,$nextCursor);
Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getGroups($access_Token);
Supported Providers: Facebook, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/group)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getGroupsWithCursor($access_Token,$nextCursor);
Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getLikes($access_Token);
Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/like)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getLikesWithCursor($access_Token,$nextCursor);
Supported Providers: Twitter [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/mention)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getMentions($access_Token);
Supported Providers: Facebook, LinkedIn [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/page)
$access_Token = "access_Token"; //Required
$pageName = "pageName"; //Required
$result = $socialAPI->getPage($access_Token,$pageName);
Supported Providers: Facebook, Foursquare, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/photo)
$access_Token = "access_Token"; //Required
$albumId = "albumId"; //Required
$result = $socialAPI->getPhotos($access_Token,$albumId);
Supported Providers: Facebook [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/post)
$access_Token = "access_Token"; //Required
$result = $socialAPI->getPosts($access_Token);
The Trackable Status API is used to update the status on the user's wall and return an Post ID value. It is commonly referred to as Permission based sharing or Push notifications. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/get-trackable-status-stats/)
$access_Token = "access_Token"; //Required
$caption = "caption"; //Required
$description = "description"; //Required
$imageurl = "imageurl"; //Required
$status = "status"; //Required
$title = "title"; //Required
$url = "url"; //Required
$result = $socialAPI->getTrackableStatusStats($access_Token,$caption,$description,$imageurl,$status,$title,$url);
This API is used to retrieve a tracked post based on the passed in post ID value. This API requires setting permissions in your LoginRadius Dashboard.
Note: To utilize this API you need to find the ID for the post you want to track, which might require using Trackable Status Posting API first. [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/trackable-status-fetching/)
$postId = "postId"; //Required
$result = $socialAPI->trackableStatusFetching($postId);
Supported Providers: All [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/user-profile)
$access_Token = "access_Token"; //Required
$fields = null; //Optional
$result = $socialAPI->getSocialUserProfile($access_Token,$fields);
$access_Token = "access_Token"; //Required
$fields = null; //Optional
$result = $socialAPI->getRefreshedSocialUserProfile($access_Token,$fields);
Supported Providers: Facebook, Google, Live, Vkontakte [More Info](https://www.loginradius.com/docs/api/v2/customer-identity-api/social-login/advanced-social-api/video)
$access_Token = "access_Token"; //Required
$nextCursor = "nextCursor"; //Required
$result = $socialAPI->getVideos($access_Token,$nextCursor);
List of APIs in this Section:
PUT : Custom Object Update by Access Token
PUT : Custom Object Update by UID
POST : Create Custom Object by Token
POST : Create Custom Object by UID
GET : Custom Object by Token
GET : Custom Object by ObjectRecordId and Token
GET : Custom Object By UID
GET : Custom Object by ObjectRecordId and UID
DELETE : Custom Object Delete by Record Id And Token
DELETE : Account Delete Custom Object by ObjectRecordId
If you have not already initialized the CustomObject object do so now
$customObjectAPI = new CustomObjectAPI();
$access_token = "access_token"; //Required
$objectName = "objectName"; //Required
$objectRecordId = "objectRecordId"; //Required
$payload = '{"customdata1": "Store my customdata1 value" }'; //Required
$updateType = "updateType"; //Optional
$result = $customObjectAPI->updateCustomObjectByToken($access_token,$objectName,$objectRecordId,$payload,$updateType);
$objectName = "objectName"; //Required
$objectRecordId = "objectRecordId"; //Required
$payload = '{"customdata1": "Store my customdata1 value" }'; //Required
$uid = "uid"; //Required
$updateType = "updateType"; //Optional
$result = $customObjectAPI->updateCustomObjectByUid($objectName,$objectRecordId,$payload,$uid,$updateType);
$access_token = "access_token"; //Required
$objectName = "objectName"; //Required
$payload = '{"customdata1": "Store my customdata1 value" }'; //Required
$result = $customObjectAPI->createCustomObjectByToken($access_token,$objectName,$payload);
$objectName = "objectName"; //Required
$payload = '{"customdata1": "Store my customdata1 value" }'; //Required
$uid = "uid"; //Required
$result = $customObjectAPI->createCustomObjectByUid($objectName,$payload,$uid);
$access_token = "access_token"; //Required
$objectName = "objectName"; //Required
$result = $customObjectAPI->getCustomObjectByToken($access_token,$objectName);
$access_token = "access_token"; //Required
$objectName = "objectName"; //Required
$objectRecordId = "objectRecordId"; //Required
$result = $customObjectAPI->getCustomObjectByRecordIDAndToken($access_token,$objectName,$objectRecordId);
$objectName = "objectName"; //Required
$uid = "uid"; //Required
$result = $customObjectAPI->getCustomObjectByUid($objectName,$uid);
$objectName = "objectName"; //Required
$objectRecordId = "objectRecordId"; //Required
$uid = "uid"; //Required
$result = $customObjectAPI->getCustomObjectByRecordID($objectName,$objectRecordId,$uid);
$access_token = "access_token"; //Required
$objectName = "objectName"; //Required
$objectRecordId = "objectRecordId"; //Required
$result = $customObjectAPI->deleteCustomObjectByToken($access_token,$objectName,$objectRecordId);
$objectName = "objectName"; //Required
$objectRecordId = "objectRecordId"; //Required
$uid = "uid"; //Required
$result = $customObjectAPI->deleteCustomObjectByRecordID($objectName,$objectRecordId,$uid);
List of APIs in this Section:
PUT : Phone Reset Password by OTP
PUT : Phone Verification OTP
PUT : Phone Verification OTP by Token
PUT : Phone Number Update
POST : Phone Login
POST : Phone Forgot Password by OTP
POST : Phone Resend Verification OTP
POST : Phone Resend Verification OTP By Token
POST : Phone User Registration by SMS
GET : Phone Number Availability
DELETE : Remove Phone ID by Access Token
If you have not already initialized the PhoneAuthentication object do so now
$phoneAuthenticationAPI = new PhoneAuthenticationAPI();
$payload = '{
"otp" : "<otp>",
"password" : "<password>",
"phone" : "<phone>"
}'; //Required
$result = $phoneAuthenticationAPI->resetPasswordByPhoneOTP($payload);
$otp = "otp"; //Required
$phone = "phone"; //Required
$fields = null; //Optional
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->phoneVerificationByOTP($otp,$phone,$fields,$smsTemplate);
$access_token = "access_token"; //Required
$otp = "otp"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->phoneVerificationOTPByAccessToken($access_token,$otp,$smsTemplate);
$access_token = "access_token"; //Required
$phone = "phone"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->updatePhoneNumber($access_token,$phone,$smsTemplate);
$payload = '{
"password" : "<password>",
"phone" : "<phone>"
}'; //Required
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->loginByPhone($payload,$fields,$loginUrl,$smsTemplate);
$phone = "phone"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->forgotPasswordByPhoneOTP($phone,$smsTemplate);
$phone = "phone"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->phoneResendVerificationOTP($phone,$smsTemplate);
$access_token = "access_token"; //Required
$phone = "phone"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $phoneAuthenticationAPI->phoneResendVerificationOTPByToken($access_token,$phone,$smsTemplate);
$payload = '{
"firstName" : "<firstName>",
"lastName" : "<lastName>",
"password" : "<password>",
"phoneId" : "<phoneId>"
}'; //Required
$sott = "sott"; //Required
$fields = null; //Optional
$options = "options"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $phoneAuthenticationAPI->userRegistrationByPhone($payload,$sott,$fields,$options,$smsTemplate,$verificationUrl,$welcomeEmailTemplate);
$phone = "phone"; //Required
$result = $phoneAuthenticationAPI->checkPhoneNumberAvailability($phone);
$access_token = "access_token"; //Required
$result = $phoneAuthenticationAPI->removePhoneIDByAccessToken($access_token);
List of APIs in this Section:
PUT : Update MFA Setting
PUT : Update MFA by Access Token
PUT : MFA Update Phone Number by Token
PUT : MFA Validate OTP
PUT : MFA Validate Google Auth Code
PUT : MFA Validate Backup code
PUT : MFA Update Phone Number
POST : MFA Email Login
POST : MFA UserName Login
POST : MFA Phone Login
GET : MFA Validate Access Token
GET : MFA Backup Code by Access Token
GET : Reset Backup Code by Access Token
GET : MFA Resend Otp
GET : MFA Backup Code by UID
GET : MFA Reset Backup Code by UID
DELETE : MFA Reset Google Authenticator by Token
DELETE : MFA Reset SMS Authenticator by Token
DELETE : MFA Reset SMS Authenticator By UID
DELETE : MFA Reset Google Authenticator By UID
If you have not already initialized the MultiFactorAuthentication object do so now
$multiFactorAuthenticationAPI = new MultiFactorAuthenticationAPI();
$access_token = "access_token"; //Required
$payload = '{
"otp" : "<otp>"
}'; //Required
$fields = null; //Optional
$result = $multiFactorAuthenticationAPI->mfaUpdateSetting($access_token,$payload,$fields);
$access_token = "access_token"; //Required
$payload = '{
"googleAuthenticatorCode" : "<googleAuthenticatorCode>"
}'; //Required
$fields = null; //Optional
$smsTemplate = "smsTemplate"; //Optional
$result = $multiFactorAuthenticationAPI->mfaUpdateByAccessToken($access_token,$payload,$fields,$smsTemplate);
$access_token = "access_token"; //Required
$phoneNo2FA = "phoneNo2FA"; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $multiFactorAuthenticationAPI->mfaUpdatePhoneNumberByToken($access_token,$phoneNo2FA,$smsTemplate2FA);
$payload = '{
"otp" : "<otp>"
}'; //Required
$secondFactorAuthenticationToken = "secondFactorAuthenticationToken"; //Required
$fields = null; //Optional
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $multiFactorAuthenticationAPI->mfaValidateOTPByPhone($payload,$secondFactorAuthenticationToken,$fields,$smsTemplate2FA);
$googleAuthenticatorCode = "googleAuthenticatorCode"; //Required
$secondFactorAuthenticationToken = "secondFactorAuthenticationToken"; //Required
$fields = null; //Optional
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $multiFactorAuthenticationAPI->mfaValidateGoogleAuthCode($googleAuthenticatorCode,$secondFactorAuthenticationToken,$fields,$smsTemplate2FA);
$payload = '{
"backupCode" : "<backupCode>"
}'; //Required
$secondFactorAuthenticationToken = "secondFactorAuthenticationToken"; //Required
$fields = null; //Optional
$result = $multiFactorAuthenticationAPI->mfaValidateBackupCode($payload,$secondFactorAuthenticationToken,$fields);
$phoneNo2FA = "phoneNo2FA"; //Required
$secondFactorAuthenticationToken = "secondFactorAuthenticationToken"; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $multiFactorAuthenticationAPI->mfaUpdatePhoneNumber($phoneNo2FA,$secondFactorAuthenticationToken,$smsTemplate2FA);
$email = "email"; //Required
$password = "password"; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $multiFactorAuthenticationAPI->mfaLoginByEmail($email,$password,$emailTemplate,$fields,$loginUrl,$smsTemplate,$smsTemplate2FA,$verificationUrl);
$password = "password"; //Required
$username = "username"; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $multiFactorAuthenticationAPI->mfaLoginByUserName($password,$username,$emailTemplate,$fields,$loginUrl,$smsTemplate,$smsTemplate2FA,$verificationUrl);
$password = "password"; //Required
$phone = "phone"; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $multiFactorAuthenticationAPI->mfaLoginByPhone($password,$phone,$emailTemplate,$fields,$loginUrl,$smsTemplate,$smsTemplate2FA,$verificationUrl);
$access_token = "access_token"; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $multiFactorAuthenticationAPI->mfaConfigureByAccessToken($access_token,$smsTemplate2FA);
$access_token = "access_token"; //Required
$result = $multiFactorAuthenticationAPI->mfaBackupCodeByAccessToken($access_token);
$access_token = "access_token"; //Required
$result = $multiFactorAuthenticationAPI->mfaResetBackupCodeByAccessToken($access_token);
$secondFactorAuthenticationToken = "secondFactorAuthenticationToken"; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $multiFactorAuthenticationAPI->mfaResendOTP($secondFactorAuthenticationToken,$smsTemplate2FA);
$uid = "uid"; //Required
$result = $multiFactorAuthenticationAPI->mfaBackupCodeByUid($uid);
$uid = "uid"; //Required
$result = $multiFactorAuthenticationAPI->mfaResetBackupCodeByUid($uid);
$access_token = "access_token"; //Required
$googleauthenticator = "true"; //Required
$result = $multiFactorAuthenticationAPI->mfaResetGoogleAuthByToken($access_token,$googleauthenticator);
$access_token = "access_token"; //Required
$otpauthenticator = "true"; //Required
$result = $multiFactorAuthenticationAPI->mfaResetSMSAuthByToken($access_token,$otpauthenticator);
$otpauthenticator = "true"; //Required
$uid = "uid"; //Required
$result = $multiFactorAuthenticationAPI->mfaResetSMSAuthenticatorByUid($otpauthenticator,$uid);
$googleauthenticator = "true"; //Required
$uid = "uid"; //Required
$result = $multiFactorAuthenticationAPI->mfaResetGoogleAuthenticatorByUid($googleauthenticator,$uid);
List of APIs in this Section:
PUT : Reset PIN By ResetToken
PUT : Reset PIN By SecurityAnswer And Email
PUT : Reset PIN By SecurityAnswer And Username
PUT : Reset PIN By SecurityAnswer And Phone
PUT : Change PIN By Token
PUT : Reset PIN by Phone and OTP
PUT : Reset PIN by Email and OTP
PUT : Reset PIN by Username and OTP
POST : PIN Login
POST : Forgot PIN By Email
POST : Forgot PIN By UserName
POST : Forgot PIN By Phone
POST : Set PIN By PinAuthToken
GET : Invalidate PIN Session Token
If you have not already initialized the PINAuthentication object do so now
$pinAuthenticationAPI = new PINAuthenticationAPI();
$payload = '{
"pin" : "<pin>",
"resetToken" : "<resetToken>"
}'; //Required
$result = $pinAuthenticationAPI->resetPINByResetToken($payload);
$payload = '{
"email" : "<email>",
"pin" : "<pin>",
"securityAnswer" : {"QuestionID":"Answer"}
}'; //Required
$result = $pinAuthenticationAPI->resetPINByEmailAndSecurityAnswer($payload);
$payload = '{
"pin" : "<pin>",
"securityAnswer" : {"QuestionID":"Answer"},
"username" : "<username>"
}'; //Required
$result = $pinAuthenticationAPI->resetPINByUsernameAndSecurityAnswer($payload);
$payload = '{
"phone" : "<phone>",
"pin" : "<pin>",
"securityAnswer" : {"QuestionID":"Answer"}
}'; //Required
$result = $pinAuthenticationAPI->resetPINByPhoneAndSecurityAnswer($payload);
$access_token = "access_token"; //Required
$payload = '{
"newPIN" : "<newPIN>",
"oldPIN" : "<oldPIN>"
}'; //Required
$result = $pinAuthenticationAPI->changePINByAccessToken($access_token,$payload);
$payload = '{
"otp" : "<otp>",
"phone" : "<phone>",
"pin" : "<pin>"
}'; //Required
$result = $pinAuthenticationAPI->resetPINByPhoneAndOtp($payload);
$payload = '{
"email" : "<email>",
"otp" : "<otp>",
"pin" : "<pin>"
}'; //Required
$result = $pinAuthenticationAPI->resetPINByEmailAndOtp($payload);
$payload = '{
"otp" : "<otp>",
"pin" : "<pin>",
"username" : "<username>"
}'; //Required
$result = $pinAuthenticationAPI->resetPINByUsernameAndOtp($payload);
$payload = '{
"pin" : "<pin>"
}'; //Required
$session_token = "session_token"; //Required
$result = $pinAuthenticationAPI->pinLogin($payload,$session_token);
$payload = '{
"email" : "<email>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$resetPINUrl = "resetPINUrl"; //Optional
$result = $pinAuthenticationAPI->sendForgotPINEmailByEmail($payload,$emailTemplate,$resetPINUrl);
$payload = '{
"userName" : "<userName>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$resetPINUrl = "resetPINUrl"; //Optional
$result = $pinAuthenticationAPI->sendForgotPINEmailByUsername($payload,$emailTemplate,$resetPINUrl);
$payload = '{
"phone" : "<phone>"
}'; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $pinAuthenticationAPI->sendForgotPINSMSByPhone($payload,$smsTemplate);
$payload = '{
"pin" : "<pin>"
}'; //Required
$pinAuthToken = "pinAuthToken"; //Required
$result = $pinAuthenticationAPI->setPINByPinAuthToken($payload,$pinAuthToken);
$session_token = "session_token"; //Required
$result = $pinAuthenticationAPI->inValidatePinSessionToken($session_token);
List of APIs in this Section:
PUT : Validate MFA by OTP
PUT : Validate MFA by Backup Code
PUT : Validate MFA by Google Authenticator Code
PUT : Validate MFA by Password
PUT : MFA Re-authentication by PIN
POST : Verify Multifactor OTP Authentication
POST : Verify Multifactor Password Authentication
POST : Verify Multifactor PIN Authentication
GET : Multi Factor Re-Authenticate
If you have not already initialized the ReAuthentication object do so now
$reAuthenticationAPI = new ReAuthenticationAPI();
$access_token = "access_token"; //Required
$payload = '{
"otp" : "<otp>"
}'; //Required
$result = $reAuthenticationAPI->mfaReAuthenticateByOTP($access_token,$payload);
$access_token = "access_token"; //Required
$payload = '{
"backupCode" : "<backupCode>"
}'; //Required
$result = $reAuthenticationAPI->mfaReAuthenticateByBackupCode($access_token,$payload);
$access_token = "access_token"; //Required
$payload = '{
"googleAuthenticatorCode" : "<googleAuthenticatorCode>"
}'; //Required
$result = $reAuthenticationAPI->mfaReAuthenticateByGoogleAuth($access_token,$payload);
$access_token = "access_token"; //Required
$payload = '{
"password" : "<password>"
}'; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $reAuthenticationAPI->mfaReAuthenticateByPassword($access_token,$payload,$smsTemplate2FA);
$access_token = "access_token"; //Required
$payload = '{
"pin" : "<pin>"
}'; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $reAuthenticationAPI->verifyPINAuthentication($access_token,$payload,$smsTemplate2FA);
$payload = '{
"secondFactorValidationToken" : "<secondFactorValidationToken>"
}'; //Required
$uid = "uid"; //Required
$result = $reAuthenticationAPI->verifyMultiFactorOtpReauthentication($payload,$uid);
$payload = '{
"secondFactorValidationToken" : "<secondFactorValidationToken>"
}'; //Required
$uid = "uid"; //Required
$result = $reAuthenticationAPI->verifyMultiFactorPasswordReauthentication($payload,$uid);
$payload = '{
"secondFactorValidationToken" : "<secondFactorValidationToken>"
}'; //Required
$uid = "uid"; //Required
$result = $reAuthenticationAPI->verifyMultiFactorPINReauthentication($payload,$uid);
$access_token = "access_token"; //Required
$smsTemplate2FA = "smsTemplate2FA"; //Optional
$result = $reAuthenticationAPI->mfaReAuthenticate($access_token,$smsTemplate2FA);
List of APIs in this Section:
PUT : Update Consent By Access Token
POST : Consent By ConsentToken
POST : Post Consent By Access Token
GET : Get Consent Logs By Uid
GET : Get Consent Log by Access Token
GET : Get Verify Consent By Access Token
If you have not already initialized the ConsentManagement object do so now
$consentManagementAPI = new ConsentManagementAPI();
$access_token = "access_token"; //Required
$payload = '{
"consents" : [ {
"consentOptionId" : "<consentOptionId>" ,
"isAccepted" : true
} ]
}'; //Required
$result = $consentManagementAPI->updateConsentProfileByAccessToken($access_token,$payload);
$consentToken = "consentToken"; //Required
$payload = '{
"data" : [ {
"consentOptionId" : "<consentOptionId>" ,
"isAccepted" : true
} ] ,
"events" : [ {
"event" : "<event>" ,
"isCustom" : true
} ]
}'; //Required
$result = $consentManagementAPI->submitConsentByConsentToken($consentToken,$payload);
$access_token = "access_token"; //Required
$payload = '{
"data" : [ {
"consentOptionId" : "<consentOptionId>" ,
"isAccepted" : true
} ] ,
"events" : [ {
"event" : "<event>" ,
"isCustom" : true
} ]
}'; //Required
$result = $consentManagementAPI->submitConsentByAccessToken($access_token,$payload);
$uid = "uid"; //Required
$result = $consentManagementAPI->getConsentLogsByUid($uid);
$access_token = "access_token"; //Required
$result = $consentManagementAPI->getConsentLogs($access_token);
$access_token = "access_token"; //Required
$event = "event"; //Required
$isCustom = "true"; //Required
$result = $consentManagementAPI->verifyConsentByAccessToken($access_token,$event,$isCustom);
List of APIs in this Section:
GET : Smart Login Verify Token
GET : Smart Login By Email
GET : Smart Login By Username
GET : Smart Login Ping
If you have not already initialized the SmartLogin object do so now
$smartLoginAPI = new SmartLoginAPI();
$verificationToken = "verificationToken"; //Required
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $smartLoginAPI->smartLoginTokenVerification($verificationToken,$welcomeEmailTemplate);
$clientGuid = "clientGuid"; //Required
$email = "email"; //Required
$redirectUrl = "redirectUrl"; //Optional
$smartLoginEmailTemplate = "smartLoginEmailTemplate"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $smartLoginAPI->smartLoginByEmail($clientGuid,$email,$redirectUrl,$smartLoginEmailTemplate,$welcomeEmailTemplate);
$clientGuid = "clientGuid"; //Required
$username = "username"; //Required
$redirectUrl = "redirectUrl"; //Optional
$smartLoginEmailTemplate = "smartLoginEmailTemplate"; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $smartLoginAPI->smartLoginByUserName($clientGuid,$username,$redirectUrl,$smartLoginEmailTemplate,$welcomeEmailTemplate);
$clientGuid = "clientGuid"; //Required
$fields = null; //Optional
$result = $smartLoginAPI->smartLoginPing($clientGuid,$fields);
List of APIs in this Section:
PUT : One Touch OTP Verification
POST : One Touch Login by Email
POST : One Touch Login by Phone
GET : One Touch Email Verification
GET : One Touch Login Ping
If you have not already initialized the OneTouchLogin object do so now
$oneTouchLoginAPI = new OneTouchLoginAPI();
$otp = "otp"; //Required
$phone = "phone"; //Required
$fields = null; //Optional
$smsTemplate = "smsTemplate"; //Optional
$result = $oneTouchLoginAPI->oneTouchLoginOTPVerification($otp,$phone,$fields,$smsTemplate);
$payload = '{
"clientguid" : "<clientguid>",
"email" : "<email>",
"g-recaptcha-response" : "<g-recaptcha-response>"
}'; //Required
$oneTouchLoginEmailTemplate = "oneTouchLoginEmailTemplate"; //Optional
$redirecturl = "redirecturl"; //Optional
$welcomeemailtemplate = "welcomeemailtemplate"; //Optional
$result = $oneTouchLoginAPI->oneTouchLoginByEmail($payload,$oneTouchLoginEmailTemplate,$redirecturl,$welcomeemailtemplate);
$payload = '{
"g-recaptcha-response" : "<g-recaptcha-response>",
"phone" : "<phone>"
}'; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $oneTouchLoginAPI->oneTouchLoginByPhone($payload,$smsTemplate);
$verificationToken = "verificationToken"; //Required
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $oneTouchLoginAPI->oneTouchEmailVerification($verificationToken,$welcomeEmailTemplate);
$clientGuid = "clientGuid"; //Required
$fields = null; //Optional
$result = $oneTouchLoginAPI->oneTouchLoginPing($clientGuid,$fields);
List of APIs in this Section:
PUT : Passwordless Login Phone Verification
GET : Passwordless Login by Phone
GET : Passwordless Login By Email
GET : Passwordless Login By UserName
GET : Passwordless Login Verification
If you have not already initialized the PasswordLessLogin object do so now
$passwordLessLoginAPI = new PasswordLessLoginAPI();
$payload = '{
"otp" : "<otp>",
"phone" : "<phone>"
}'; //Required
$fields = null; //Optional
$smsTemplate = "smsTemplate"; //Optional
$result = $passwordLessLoginAPI->passwordlessLoginPhoneVerification($payload,$fields,$smsTemplate);
$phone = "phone"; //Required
$smsTemplate = "smsTemplate"; //Optional
$result = $passwordLessLoginAPI->passwordlessLoginByPhone($phone,$smsTemplate);
$email = "email"; //Required
$passwordLessLoginTemplate = "passwordLessLoginTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $passwordLessLoginAPI->passwordlessLoginByEmail($email,$passwordLessLoginTemplate,$verificationUrl);
$username = "username"; //Required
$passwordLessLoginTemplate = "passwordLessLoginTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $passwordLessLoginAPI->passwordlessLoginByUserName($username,$passwordLessLoginTemplate,$verificationUrl);
$verificationToken = "verificationToken"; //Required
$fields = null; //Optional
$welcomeEmailTemplate = "welcomeEmailTemplate"; //Optional
$result = $passwordLessLoginAPI->passwordlessLoginVerification($verificationToken,$fields,$welcomeEmailTemplate);
List of APIs in this Section:
GET : Get Configurations
GET : Get Server Time
If you have not already initialized the Configuration object do so now
$configurationAPI = new ConfigurationAPI();
$timeDifference = 0; //Optional
$result = $configurationAPI->getServerInfo($timeDifference);
List of APIs in this Section:
PUT : Assign Roles by UID
PUT : Upsert Context
PUT : Add Permissions to Role
POST : Roles Create
GET : Roles by UID
GET : Get Context with Roles and Permissions
GET : Role Context profile
GET : Roles List
DELETE : Unassign Roles by UID
DELETE : Delete Role Context
DELETE : Delete Role from Context
DELETE : Delete Additional Permission from Context
DELETE : Account Delete Role
DELETE : Remove Permissions
If you have not already initialized the Role object do so now
$roleAPI = new RoleAPI();
$payload = '{
"roles" : [ "roles" ]
}'; //Required
$uid = "uid"; //Required
$result = $roleAPI->assignRolesByUid($payload,$uid);
$payload = '{
"roleContext" : [ {
"additionalPermissions" : ["<additionalPermissions>" ] ,
"context" : "<context>" ,
"expiration" : "<expiration>" ,
"roles" : ["<roles>" ]
} ]
}'; //Required
$uid = "uid"; //Required
$result = $roleAPI->updateRoleContextByUid($payload,$uid);
$payload = '{
"permissions" : [ "permissions" ]
}'; //Required
$role = "role"; //Required
$result = $roleAPI->addRolePermissions($payload,$role);
$payload = '{
"roles" : [ {
"name" : "<name>" ,
"permissions" : {"Permission_name":true}
} ]
}'; //Required
$result = $roleAPI->createRoles($payload);
$uid = "uid"; //Required
$result = $roleAPI->getRolesByUid($uid);
$uid = "uid"; //Required
$result = $roleAPI->getRoleContextByUid($uid);
$contextName = "contextName"; //Required
$result = $roleAPI->getRoleContextByContextName($contextName);
$result = $roleAPI->getRolesList();
$payload = '{
"roles" : [ "roles" ]
}'; //Required
$uid = "uid"; //Required
$result = $roleAPI->unassignRolesByUid($payload,$uid);
$contextName = "contextName"; //Required
$uid = "uid"; //Required
$result = $roleAPI->deleteRoleContextByUid($contextName,$uid);
$contextName = "contextName"; //Required
$payload = '{
"roles" : [ "roles" ]
}'; //Required
$uid = "uid"; //Required
$result = $roleAPI->deleteRolesFromRoleContextByUid($contextName,$payload,$uid);
$contextName = "contextName"; //Required
$payload = '{
"additionalPermissions" : [ "additionalPermissions" ]
}'; //Required
$uid = "uid"; //Required
$result = $roleAPI->deleteAdditionalPermissionFromRoleContextByUid($contextName,$payload,$uid);
$role = "role"; //Required
$result = $roleAPI->deleteRole($role);
$payload = '{
"permissions" : [ "permissions" ]
}'; //Required
$role = "role"; //Required
$result = $roleAPI->removeRolePermissions($payload,$role);
List of APIs in this Section:
PUT : Update Registration Data
POST : Validate secret code
POST : Add Registration Data
GET : Auth Get Registration Data Server
GET : Get Registration Data
DELETE : Delete Registration Data
DELETE : Delete All Records by Datasource
If you have not already initialized the CustomRegistrationData object do so now
$customRegistrationDataAPI = new CustomRegistrationDataAPI();
$payload = '{
"isActive" : true,
"key" : "<key>",
"type" : "<type>",
"value" : "<value>"
}'; //Required
$recordId = "recordId"; //Required
$result = $customRegistrationDataAPI->updateRegistrationData($payload,$recordId);
$code = "code"; //Required
$recordId = "recordId"; //Required
$result = $customRegistrationDataAPI->validateRegistrationDataCode($code,$recordId);
$payload = '{
"data" : [ {
"code" : "<code>" ,
"isActive" : true ,
"key" : "<key>" ,
"parentId" : "<parentId>" ,
"type" : "<type>" ,
"value" : "<value>"
} ]
}'; //Required
$result = $customRegistrationDataAPI->addRegistrationData($payload);
$type = "type"; //Required
$limit = 0; //Optional
$parentId = "parentId"; //Optional
$skip = 0; //Optional
$result = $customRegistrationDataAPI->authGetRegistrationData($type,$limit,$parentId,$skip);
$type = "type"; //Required
$limit = 0; //Optional
$parentId = "parentId"; //Optional
$skip = 0; //Optional
$result = $customRegistrationDataAPI->getRegistrationData($type,$limit,$parentId,$skip);
$recordId = "recordId"; //Required
$result = $customRegistrationDataAPI->deleteRegistrationData($recordId);
$type = "type"; //Required
$result = $customRegistrationDataAPI->deleteAllRecordsByDataSource($type);
List of APIs in this Section:
POST : Risk Based Authentication Login by Email
POST : Risk Based Authentication Login by Username
POST : Risk Based Authentication Phone Login
If you have not already initialized the RiskBasedAuthentication object do so now
$riskBasedAuthenticationAPI = new RiskBasedAuthenticationAPI();
$payload = '{
"email" : "<email>",
"password" : "<password>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$passwordDelegation = "true"; //Optional
$passwordDelegationApp = "passwordDelegationApp"; //Optional
$rbaBrowserEmailTemplate = "rbaBrowserEmailTemplate"; //Optional
$rbaBrowserSmsTemplate = "rbaBrowserSmsTemplate"; //Optional
$rbaCityEmailTemplate = "rbaCityEmailTemplate"; //Optional
$rbaCitySmsTemplate = "rbaCitySmsTemplate"; //Optional
$rbaCountryEmailTemplate = "rbaCountryEmailTemplate"; //Optional
$rbaCountrySmsTemplate = "rbaCountrySmsTemplate"; //Optional
$rbaIpEmailTemplate = "rbaIpEmailTemplate"; //Optional
$rbaIpSmsTemplate = "rbaIpSmsTemplate"; //Optional
$rbaOneclickEmailTemplate = "rbaOneclickEmailTemplate"; //Optional
$rbaOTPSmsTemplate = "rbaOTPSmsTemplate"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $riskBasedAuthenticationAPI->rbaLoginByEmail($payload,$emailTemplate,$fields,$loginUrl,$passwordDelegation,$passwordDelegationApp,$rbaBrowserEmailTemplate,$rbaBrowserSmsTemplate,$rbaCityEmailTemplate,$rbaCitySmsTemplate,$rbaCountryEmailTemplate,$rbaCountrySmsTemplate,$rbaIpEmailTemplate,$rbaIpSmsTemplate,$rbaOneclickEmailTemplate,$rbaOTPSmsTemplate,$smsTemplate,$verificationUrl);
$payload = '{
"password" : "<password>",
"username" : "<username>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$passwordDelegation = "true"; //Optional
$passwordDelegationApp = "passwordDelegationApp"; //Optional
$rbaBrowserEmailTemplate = "rbaBrowserEmailTemplate"; //Optional
$rbaBrowserSmsTemplate = "rbaBrowserSmsTemplate"; //Optional
$rbaCityEmailTemplate = "rbaCityEmailTemplate"; //Optional
$rbaCitySmsTemplate = "rbaCitySmsTemplate"; //Optional
$rbaCountryEmailTemplate = "rbaCountryEmailTemplate"; //Optional
$rbaCountrySmsTemplate = "rbaCountrySmsTemplate"; //Optional
$rbaIpEmailTemplate = "rbaIpEmailTemplate"; //Optional
$rbaIpSmsTemplate = "rbaIpSmsTemplate"; //Optional
$rbaOneclickEmailTemplate = "rbaOneclickEmailTemplate"; //Optional
$rbaOTPSmsTemplate = "rbaOTPSmsTemplate"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $riskBasedAuthenticationAPI->rbaLoginByUserName($payload,$emailTemplate,$fields,$loginUrl,$passwordDelegation,$passwordDelegationApp,$rbaBrowserEmailTemplate,$rbaBrowserSmsTemplate,$rbaCityEmailTemplate,$rbaCitySmsTemplate,$rbaCountryEmailTemplate,$rbaCountrySmsTemplate,$rbaIpEmailTemplate,$rbaIpSmsTemplate,$rbaOneclickEmailTemplate,$rbaOTPSmsTemplate,$smsTemplate,$verificationUrl);
$payload = '{
"password" : "<password>",
"phone" : "<phone>"
}'; //Required
$emailTemplate = "emailTemplate"; //Optional
$fields = null; //Optional
$loginUrl = "loginUrl"; //Optional
$passwordDelegation = "true"; //Optional
$passwordDelegationApp = "passwordDelegationApp"; //Optional
$rbaBrowserEmailTemplate = "rbaBrowserEmailTemplate"; //Optional
$rbaBrowserSmsTemplate = "rbaBrowserSmsTemplate"; //Optional
$rbaCityEmailTemplate = "rbaCityEmailTemplate"; //Optional
$rbaCitySmsTemplate = "rbaCitySmsTemplate"; //Optional
$rbaCountryEmailTemplate = "rbaCountryEmailTemplate"; //Optional
$rbaCountrySmsTemplate = "rbaCountrySmsTemplate"; //Optional
$rbaIpEmailTemplate = "rbaIpEmailTemplate"; //Optional
$rbaIpSmsTemplate = "rbaIpSmsTemplate"; //Optional
$rbaOneclickEmailTemplate = "rbaOneclickEmailTemplate"; //Optional
$rbaOTPSmsTemplate = "rbaOTPSmsTemplate"; //Optional
$smsTemplate = "smsTemplate"; //Optional
$verificationUrl = "verificationUrl"; //Optional
$result = $riskBasedAuthenticationAPI->rbaLoginByPhone($payload,$emailTemplate,$fields,$loginUrl,$passwordDelegation,$passwordDelegationApp,$rbaBrowserEmailTemplate,$rbaBrowserSmsTemplate,$rbaCityEmailTemplate,$rbaCitySmsTemplate,$rbaCountryEmailTemplate,$rbaCountrySmsTemplate,$rbaIpEmailTemplate,$rbaIpSmsTemplate,$rbaOneclickEmailTemplate,$rbaOTPSmsTemplate,$smsTemplate,$verificationUrl);
List of APIs in this Section:
GET : Generate SOTT
If you have not already initialized the Sott object do so now
$sottAPI = new SottAPI();
$timeDifference = 0; //Optional
$result = $sottAPI->generateSott($timeDifference);
List of APIs in this Section:
GET : Access Token via Facebook Token
GET : Access Token via Twitter Token
GET : Access Token via Google Token
GET : Access Token using google JWT token for Native Mobile Login
GET : Access Token via Linkedin Token
GET : Get Access Token By Foursquare Access Token
GET : Access Token via Apple Id Code
GET : Access Token via WeChat Code
GET : Access Token via Vkontakte Token
GET : Access Token via Google AuthCode
If you have not already initialized the NativeSocial object do so now
$nativeSocialAPI = new NativeSocialAPI();
$fb_Access_Token = "fb_Access_Token"; //Required
$socialAppName = "socialAppName"; //Optional
$result = $nativeSocialAPI->getAccessTokenByFacebookAccessToken($fb_Access_Token,$socialAppName);
$tw_Access_Token = "tw_Access_Token"; //Required
$tw_Token_Secret = "tw_Token_Secret"; //Required
$socialAppName = "socialAppName"; //Optional
$result = $nativeSocialAPI->getAccessTokenByTwitterAccessToken($tw_Access_Token,$tw_Token_Secret,$socialAppName);
$google_Access_Token = "google_Access_Token"; //Required
$client_id = "client_id"; //Optional
$refresh_token = "refresh_token"; //Optional
$socialAppName = "socialAppName"; //Optional
$result = $nativeSocialAPI->getAccessTokenByGoogleAccessToken($google_Access_Token,$client_id,$refresh_token,$socialAppName);
$id_Token = "id_Token"; //Required
$result = $nativeSocialAPI->getAccessTokenByGoogleJWTAccessToken($id_Token);
$ln_Access_Token = "ln_Access_Token"; //Required
$socialAppName = "socialAppName"; //Optional
$result = $nativeSocialAPI->getAccessTokenByLinkedinAccessToken($ln_Access_Token,$socialAppName);
$fs_Access_Token = "fs_Access_Token"; //Required
$result = $nativeSocialAPI->getAccessTokenByFoursquareAccessToken($fs_Access_Token);
$code = "code"; //Required
$socialAppName = "socialAppName"; //Optional
$result = $nativeSocialAPI->getAccessTokenByAppleIdCode($code,$socialAppName);
$code = "code"; //Required
$result = $nativeSocialAPI->getAccessTokenByWeChatCode($code);
$vk_access_token = "vk_access_token"; //Required
$result = $nativeSocialAPI->getAccessTokenByVkontakteAccessToken($vk_access_token);
$google_authcode = "google_authcode"; //Required
$socialAppName = "socialAppName"; //Optional
$result = $nativeSocialAPI->getAccessTokenByGoogleAuthCode($google_authcode,$socialAppName);
List of APIs in this Section:
POST : Webhook Subscribe
GET : Webhook Subscribed URLs
GET : Webhook Test
DELETE : WebHook Unsubscribe
If you have not already initialized the WebHook object do so now
$webHookAPI = new WebHookAPI();
$payload = '{
"event" : "<event>",
"targetUrl" : "<targetUrl>"
}'; //Required
$result = $webHookAPI->webHookSubscribe($payload);
$event = "event"; //Required
$result = $webHookAPI->getWebHookSubscribedURLs($event);
$result = $webHookAPI->webhookTest();
$payload = '{
"event" : "<event>",
"targetUrl" : "<targetUrl>"
}'; //Required
$result = $webHookAPI->webHookUnsubscribe($payload);
- In order to implement custom HTTP client. Create the customhttpclient.php file in your project.
namespace LoginRadiusSDK\Clients\IHttpClient;
use LoginRadiusSDK\Utility\Functions;
use LoginRadiusSDK\LoginRadiusException;
class CustomHttpClient implements IHttpClient {
public function request($path, $query_array = array(), $options = array()) {
//custom HTTP client request handler code here
}
}
- After that, pass the class name of your custom http client in global variable** $apiClient_class** in your project.
Note
>If you manually added LoginRadius SDK then please make sure that customhttpclient.php file included in your project. ``` global $apiClient_class; $apiClient_class = 'CustomHttpClient'; ```
Now your Custom HTTP client library will be used to handle LoginRadius APIs.
Check out the demo and get the full SDK on our Github
Please find the reference manual here