Donate using PayPal

CycleStreets API (v2)

  • Details for:
  • API overview
  • Obtain API key
  • Usage policy
  • Uptime policy

User create

This API call creates a new user account.

When creating an account, the user must specify an e-mail address, a username, and optionally a display name. The username is used in the URL of the user's profile on the website. By default the profile is not visible, unless the user has specifically added any user-generated content such as a Photomap submission.

A successful submission will issue an e-mail, which the user must click on to validate the account and thereby complete the user creation process.

In subsequent validation using the user.validate call, or using the login form on the website, users can use either their username or e-mail address as the identity to validate against.

Usernames and e-mail addresses are unique, i.e. a user cannot have multiple accounts against a single e-mail address.

Security: Passwords are not stored in plain text but instead only as a hash. (Hashes are automatically upgraded upon login as newer algorithms become available.) Also, as with the rest of the API, this method requires use of HTTPS.

Example

Example which creates a new user account, triggering an e-mail for validation.

POST https://api.cyclestreets.net/v2/user.create

(
	[username] => myusername
	[password] => mypassword1978
	[email] => user@example.com
	[name] => Sam Smith
)

Result:

{
    "successmessage": "Please check your e-mail to confirm the account creation."
}

Request parameters - required

This call requires a POST operation, to avoid us logging user credentials in the server logs.

username string, regexp: ^([a-z0-9]{5,})$
The desired username. The user can use the username or e-mail to log in with subsequently. The username is used in the URL of the user's profile on the website. By default the profile is not visible, unless the user has specifically added any user-generated content such as a Photomap submission.
password string, minimum length 6
The desired password. Passwords must be a minimum length of 6 characters, and must include at least one letter and one number.
email string
The user's e-mail address, which must be syntactically valid, and not already registered. The user can use the username or e-mail to log in with subsequently. The e-mail address is never shown online.
(name - is optional but strongly recommended; see below.)

Request parameters - optional

name string (can be empty)
The display name of the user which will appear next to the user's contributions online, if they have any. If this is not available, the username will be shown. This field is optional, but if present, an empty string can also submitted.

Response

If successful, a JSON object as above, containing a single field successmessage, the value of which is a string that should be passed on to the user.

Error response

JSON object containing an error key and a text string.

The error string from this method is suitable for passing directly on to the user.

Example errors (text string may vary):

{
    "error": "There was a problem creating the account. Please try again later."
}
{
    "error": "The password must include at least one letter and number."
}

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * http://www.cyclestreets.dk/api/v2/user.create/
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.