SysCreateUserExternalAuth
Manually creates a new user for the current app. Note that this API is normally used for in an admin app for pre-creating users. Standard, dynamic, on-the-fly authentication is done via the Authentication service.
Service | Operation |
---|---|
user | SYS_CREATE_USER_EXTERNAL_AUTH |
Method Parameters
Parameter | Description |
---|---|
externalId | The email address of the user |
externalAuthType | The external auth type code |
userName | The display or contact name of the user (stored in player state) |
contactEmail | The email address of the user |
notificationTemplateId | If specified, the user will be sent an email confirming that the account has been created |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var userProxy = bridge.getUserServiceProxy();
var postResult = userProxy.sysCreateUserExternalAuth(
"bruce1970", // externalId
"corpdir", // externalAuthType
"R@b1n3gg", // userName
"Bats", // contactEmail
"d-eb88215a71bb42e44xb5a35d75fcd6193" );
// notificationTemplateId
if (postResult.status == 200) {
// Success!
}
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"status": 200,
"data": {
"profileId": "0b53155b-1fc8-4916-xxxx-298379efc67a"
}
}