String userName = "Nick";
String pwd = "********";
String emailId = "nick@gmail.com";
App42Callback requestCallback = this; /* This function used the App42Callback interface */
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
UserService userService = api.BuildUserService();
userService.CreateUser(userName,pwd,emailId,requestCallback);
OnSucess(Object obj)
{
User user = (User) obj;
String jsonResponse = user.ToString();
}
public class CallBack : App42Callback
{
public override void OnSuccess(Object obj)
{
User user = (User) obj;
//Do whatever you want with the object
}
public override void OnException(App42Exception e)
{
//Do whatever you want with the exception
}
}
String userName = "Nick";
String pwd = "********";
String emailId = "nick@gmail.com";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
UserService userService = api.buildUserService();
User user = userService.createUser(userName, pwd, emailId);
String jsonResponse = user.toString();
String userName = "Nick";
String pwd = "********";
String emailId = "nick@shephertz.com";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
UserService userService = api.buildUserService();
User user = userService.createUser(userName, pwd, emailId);
String jsonResponse = user.toString();
NSString *userName = @"Nick";
NSString *password = @"********";
NSString *emailId = @"nick@shephertz.com";
ServiceAPI *serviceAPIObj = [[ServiceAPI alloc]init];
serviceAPIObj.apiKey = @"<API_KEY>";
serviceAPIObj.secretKey = @"<SECRET_KEY>";
UserService *userService = [serviceAPIObj buildUserService];
User *user = [userService createUser:userName password:password emailAddress:emailId];
NSString *jsonResponse = [user toString];
String userName = "Nick";
String pwd = "********";
String emailId = "nick@shephertz.com";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
UserService userService = api.buildUserService();
User user = userService.createUser(userName, pwd, emailId);
String jsonResponse = user.toString();
String userName = "Nick";
String pwd = "********";
String emailId = "nick@shephertz.com";
ServiceAPI api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
UserService userService = api.BuildUserService();
User user = userService.CreateUser(userName, pwd, emailId);
String jsonResponse = user.ToString();
uName = "Nick";
pwd = "********";
emailId = "nick@shephertz.com";
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>");
userService = api.buildUserService();
user = userService.create_user(uName, pwd, emailId);
jsonResponse = user.to_s();
The request format for create User is
URL : https://api.shephertz.com/cloud/1.0/user
Method : POST
QueryParam : apiKey=<apiKey>&signature=<signature>&version=<version>×tamp=<UTC_FORMATED_TIME_STAMP>
Accept : application/json
Content-Type : application/json
Body : {"app42":{"user":{"userName": "Nick","password": "******","email": "nick@shephertz.com"}}}
var user = new App42User(); // App42User supports User registration, retrieval, state management e.g. lock, delete and Authentication.
var userName = "Nick";
var pwd = "********";
var emailId = "nick@gmail.com";
// In order to use the various functions available under a particular API, a developer will have to call the
// App42.initialize method by passing the apiKey and the secretKey.
App42.initialize("<API_KEY>","<SECRET_KEY>");
user.createUser(userName, pwd, emailId,{
success: function(object) {
// User Object creation
},
error: function(error) {
// User exception handled
}
});
$userName = "Nick";
$pwd = "********";
$emailId = "nick@gmail.com";
$api = new ServiceAPI("<API_KEY>","<SECRET_KEY>");
$userService = $api->buildUserService();
$user = $userService->createUser($userName, $pwd, $emailId);
$jsonResponse = $user->toString();