Versions Compared

Key

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

Reactivates a user from a service.

Description

This method activates a user from a service.
Organization Id is optional.

Package Details

Interface

IServiceManager

Syntax

IServiceManager.Activate(int userId, int serviceId, int? organizationId = null)

API

...

Implementation Notes

Internal users must not be associated with any organizations.

POST
/api/v1/services/{idserviceId}/activate-user"Parameter:
int id: Service id
int UserId: User id
int organizationId: Organization Id (Optional)?userId={userId}&organizationId={organizationId}

Parameters

Parameter

Description

Parameter Type

serviceId

Service Id

Path

userId

User Id

Query string

organizationId (Optional)

Organization Id

Query string

Returns

200 OK

Example

Code Block
languagec#
int id = 2

...

;
int userId = 2757

...

;
int organizationId = 5950

...

;

if (organizationId.HasValue)

...

{      
  await _serviceManager.Activate(userId, id, organizationId.Value);

...


}

...


else

...

{     
  await _serviceManager.Activate(userId, id);

...


}