activate member
API Support | Available since | Last updated | Output |
---|---|---|---|
4.9100 | 6.0000 | json, xml |
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
Name | Description | Required | Type | Default |
---|---|---|---|---|
token | The account activation token | yes | string | |
key | The activation key – Obsolete as of v6, use token instead | no | string |
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.
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
Code | Cause / Description |
---|---|
0x0000 | The token or key is required |
0x102A | Token is invalid or has expired |
0x0204 | The Member was not found |