Skip to main content

 Web service API

How to use PageSeeder's Web service API

activate member

/members/{member}/activate [POST]

com.pageseeder.member.ActivateMember

Description

Activate a member.

The member to activate must be specified in the URL.

This service has no effect if the member is already activated.

Parameters

No parameters required—this service is designed so that administrators can activate a member without a key.

Permission

This service can only be invoked by administrator. Users can only activate their account with a valid token using /members/{member}/activate [GET] .

Response

This service returns the <member> element wrapped in a <member-activation> element. If the member has already been activated, the attribute @already-activated is included on the wrapper.

For example, if the administrator activates the member account successfully, this service returns:

<member-activation>
  <member id="123" 
          firstname="John" 
          surname="Smith" 
          username="jsmith" 
          flags="t" 
          status="activated">
    <fullname>John Smith</fullname>
  </member>
</member-activation>

And, if the same account is activated a second time, it is:

<member-activation already-activated="true">
  <member id="123" 
          firstname="John" 
          surname="Smith" 
          username="jsmith" 
          flags="t" 
          status="activated">
    <fullname>John Smith</fullname>
  </member>
</member-activation>

Error Handling

No specific errors expected for this service.

If there is no member corresponding to the specified ID, this service returns an HTTP 404 error with the following message:

<error id="0204">
  <request>/ps/service/members/[id]/activate</request>
  <message>Member not found</message>
</error>
Created on , last edited on