What we’ve found is, their user accounts are not being created via the API call. We currently have no limit as to the amount of users we’re allowed to create.
The code we’ve written to create their account is as follows:
GD_GroupDocsSecurityHandler securityHandler = new GD_GroupDocsSecurityHandler(GD_Utils.privateKey);
GD_ApiClient api = new GD_ApiClient(securityHandler);
GD_MgmtApi mgmtApi = new GD_MgmtApi(api);
//Check if user exists:
String userEmail = UserInfo.getUserEmail();
String firstname = UserInfo.getFirstName();
String lastname = UserInfo.getLastName();
GD_UserInfo userObj = new GD_UserInfo();
GD_RoleInfo role = new GD_RoleInfo();
List<GD_RoleInfo> rolesList = new List<GD_RoleInfo>();
//Set user role Id. Can be: 1 - SysAdmin, 2 - Admin, 3 - User, 4 - Guest
role.name = ‘User’;
role.id = 3;
//Set user role name. Can be: SysAdmin, Admin, User, Guest
userObj.nickname = userEmail;
userObj.firstname = firstname;
userObj.lastname = lastname;
userObj.primary_email = userEmail;
userObj.id = 0;
userObj.apps = ‘127’;
userObj.alerts_eanbled = false;
rolesList.add(role);
userObj.roles = rolesList;
GD_UpdateAccountUserResponse createAccountUserResponse = mgmtApi.UpdateAccountUser(GD_Utils.clientId, userObj.primary_email, userObj);
string status = createAccountUserResponse.status;
if (status.containsIgnoreCase(‘ok’)) {
GD_UpdateAccountUserResult result = createAccountUserResponse.result;
String newUserGuid = result.guid;
status += 'newUserGuid: ’ + newUserGuid;
StUtils.StDebug('New User guid: ’ + newUserGuid);
userObj.guid = newUserGuid;
} else {
StUtils.StDebug('Create user error: ’ + createAccountUserResponse.error_message);
}
return userObj;
Can you provide some assistance? Our admin email for GroupDocs is admin@mavengrp.com