Skip to main content

 Web service API

How to use PageSeeder's Web service API

activate member

/members/{member}/activate [GET]

com.pageseeder.member.ActivateMemberWithKey

Description

Activate the specified member.

The member to activate is specified on the URL.

If the member is already activated, this service has no effect and the returned XML includes an attribute @already-activated set to true.

Parameters

NameDescriptionRequiredTypeDefault value
tokenThe account activation tokenyesstring
keyThe activation key – DEPRECATED, use token insteadnostring

token

The activation token is sent by email to new users as part of their activation link. See the member activation flow for details. It is required unless an activation key was used and is the preferred mechanism.

If both a token and key are specified, the token takes precedence and the key is ignored. 

key

The activation key was PageSeeder’s previous activation mechanism and has the same effect as the token on this service. 

The activation key is not required, except if the token is not provided.

PageSeeder no longer sends activation keys by email. This parameter is still accepted for legacy systems using older email templates. New implementations shouldn’t used keys. 

Permission

Anyone can invoke this service provided that a valid activation key is supplied.

Administrators can also activate the account of other users without an activation key with /members/{member}/activate [POST]

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 a member activates her account successfully, this service returns:

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

And, if she activates her account a second time, it is:

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

Error Handling

CodeCause / Description
0x0000The token or key is required
0x102AToken is invalid or has expired
0x1011If the specified key is invalid
0x1014The supplied activation key is invalid
0x0204The Member was not found
Created on , last edited on