check username
API Support | Available since | Last updated | Output |
---|---|---|---|
5.9400 | 5.9500 | json, xml |
Description
Checks if a username is in use and is valid.
This service is used when users choose a username during the activation process to indicate whether the submitted username is already in use.
To be valid, the username must be unique, between 1 and 100 characters, and only contain alphanumeric characters, underscore, dash and dot, with at least one non-number.
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
token | The activation token for the member | no | string | |
username | The username to check | no | string |
Permission
Only a member with a valid activation token or an administrator can use this service.
Response
The XML returned is always:
<username-check usedby="[current|other|none]" valid="[true|false]" />
The @usedby attribute value indicates whether the username specified in the request is already in use:
current
– currently attributed to the current user.other
– already attributed to another user.none
– not attributed to anyone.
The @valid attribute is set to true
when the username is valid, and false
otherwise.
The username selected by the user can be set as their username if usedby=current
or usedby=none
, and valid=true
.
Error Handling
0x102A | the token is invalid or has expired |
---|