APIUser: This would be provided to you by admin. You can use same value to generate your token.
APIKey: This would be provided to you by admin. You can use same value to generate your token.
Token: This would be generated when you authorise your credentials (APIUser and APIKey) through generateToken API call. You can use token value to access all the API call.
act: Use exactly same value for act with following APIs, either one of listed values below act input or the auto filled value.
require_once "Curl/autoload_curl.php";
require_once "J1AppLib/autoload_j1app.php";
use J1AppLib\J1App;
$apikey = "123456XXXX";
$apiuser = "exampleXXXX@test.com";
$api = new J1App($apikey, $apiuser);
// Example - 1
$api_response = $api->getPost("getCountries");
// Example - 2
$payload = ['country_id' => 3];
$api_response = $api->getPost("getCountries",$payload);
// Note: following fields will be bind automatically (APIUser, APIKey, act) no need to pass with every request ($payload).
require_once "Curl/autoload_curl.php";
require_once "J1AppLib/autoload_j1app.php";
use J1AppLib\J1App;
$apikey = "123456XXXX";
$apiuser = "exampleXXXX@test.com";
$ServerToken = "abc12313XXXX"; // server token will be found in login response.
$deviceToken = "abc12313XXXX";
$api = new J1App($apikey, $apiuser);
$api = $api->setServerToken($ServerToken)->setDeviceToken($deviceToken);
$payload = ['first_name' => "test", 'last_name' => "test new", 'j1_email_address' => "test@test.com", 'password' => "test1234", 'confirm_password' => "test1234"];
$api_response = $api->getPost("userRegister",$payload);
// Note: following fields will be bind automatically (APIUser, APIKey, act, DeviceToken, ServerToken) no need to pass with every request ($payload).
Note:
- google_email and google_id required in pair - twitter_email and twitter_id required in pair
- facebook_email and facebook_id required in pair - Minimum one pair is require to add/update call
Note: Use this API to reload profile after certain action. For eg: After updating any profile info from update profile you need to reload user details.
require_once "Curl/autoload_curl.php";
require_once "J1AppLib/autoload_j1app.php";
use J1AppLib\J1App;
$apikey = "123456XXXX";
$apiuser = "exampleXXXX@test.com";
$ServerToken = "abc12313XXXX"; // server token will be found in login response.
$deviceToken = "abc12313XXXX";
$api = new J1App($apikey, $apiuser);
$api = $api->setServerToken($ServerToken)->setDeviceToken($deviceToken);
$api_response = $api->getPost("allStages");
// Note: following fields will be bind automatically (APIUser, APIKey, act, DeviceToken, ServerToken) no need to pass with every request ($payload).