Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Set the enrollment key for a specified user and service. You cannot associate an internal user with an organization.

Package Details

Interface

IAccountManager

...

AccountManager.SetActivationKey(int userId, int serviceId, string enrollmentKey, [int? organizationId = null])

Returns

Task (void)

API

...

[PUT
/api/v1/account/set-activation-key

...

userId: [Integer] User id.

...

serviceId: [Integer] Service id

...

enrollmentKey : [string] Enrollment 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

Code Block
languagec#
int userId = 1;
int serviceId = 2;
string enrollmentKey = "aeao0330apadf3";
await _accountManager.SetActivationKey(userId, serviceId, enrollmentKey);

Code Block
languagec#
int userId = 1;
int serviceId = 2;
string enrollmentKey = "aeao0330apadf3";
int organizationId = 1212;
await _accountManager.SetActivationKey(userId, serviceId, enrollmentKey, organizationId);

...