Set the enrollment key for a specified user and service
Description
Set the enrollment key for a specified user and service.
Package Details
Interface
IAccountManager
Syntax
AccountManager.SetActivationKey(int userId, int serviceId, string enrollmentKey, [int? organizationId = null])
Returns
Task (void)
API
Implementation Notes
Internal users must not be associated with any organizations.
PUT
/api/v1/account/set-activation-key?userId={userId}&serviceId={serviceId}&enrollmentKey={enrollmentKey}&organizationId={organizationId}
Parameter
Parameter | Description | Parameter Type |
---|---|---|
userId | User Id | Query string |
serviceId | ServiceId | Query string |
enrollmentKey | Entrollment Key | Query string |
organizationId (optional) | Organization Id | Query string |
Returns
HTTP 200 OK if successful, 401 if unauthorized, 400 otherwise.
Example
int userId = 1; int serviceId = 2; string enrollmentKey = "aeao0330apadf3"; await _accountManager.SetActivationKey(userId, serviceId, enrollmentKey);
int userId = 1; int serviceId = 2; string enrollmentKey = "aeao0330apadf3"; int organizationId = 1212; await _accountManager.SetActivationKey(userId, serviceId, enrollmentKey, organizationId);