1. Developers»
  2. Installing Clickpass»
  3. Get registration info

Getting users' registration info

URLs required on your site

The registration form

Clickpass allows you to get registration information for your users directly from an API. They give it a quick once-over and then it's sent off to you to sign them up.

The Clickpass registration form is hosted and displayed at Clickpass - all you have to do is to send referrals to it

image of Clickpass Registration Form

The registration form page displays the Clickpass registration form and prompts your user to create a new account with you.

If available, Clickpass will pre-populate all variables requested. Clickpass offers a limited selection of some of the most popular registration parameters.

Purpose of the registration form

  1. To match existing users to their account (merge them)
  2. To register new users as quickly as possible

How the form works

  1. YourSite.com directs the user to the registration form together with the parameters required.
  2. The registration form asks the user whether they have an existing account or not:
    • If they do, the form links them to that account using begin_add_openid_to_user
    • If they don't then the form displays a registration form pre-populated with the user's details
  3. The completed form is submitted to you
  4. You validates inputs and redirects errors back via the URL
  5. Form displays errors to user and prompts for correct
  6. (rinse and repeat as necessary)
  7. You receives valid registration parameters. Get that man a new account!

Example forms

Example form 1

Form including: given-name (labelled as 'First name'), email, nickname (required and displayed as 'Username'):

  • Request URL: Need to create form and add in
Example form 2

Form including: email (required, labelled as 'Email address', agreement to terms of service, terms of service URL, username (labelled as handle)

  • Request URL: Need to create form and add in

Form parameters

Parameter (*required) Description
site_key * Clickpass API key for your site
process_openid_registration_url * The URL at your site which will receive the registration form submission
new_openid_completion_url The URL at your site to which a user should be sent once a new registration is validated and complete
logo_url URL to image that is is used for your logo on the page (180px x 50px)
requested_parameters Comma separated list of parameters to request from user
required_parameters Comma separated list of parameters to require from user
Parameters that can be passed to requested_parameters / required_parameters
email User's email address
given-name First or given name
family-name Last or family name
nickname Nickname or username
photo-url URL to user's profile photo
Parameter labels
email_label Default value: "Email"
given-name_label Default value: "Given name"
family-name_label Default value: "Family name"
nickname_label Default value: "Nickname"
photo-url_label Default value: "Profile photo"
Other available fields (treated as required if present)
tos_url A URL to the terms of service at your website:
"I agree to the terms of service of <your site name>"
privacy_policy_url A link to your site's privacy policy:
"I accept the privacy policy of <your site name>"
Error fields (will be displayed to the user in the registration form)
email_error Error on email
given-name_error Error on given-name
family-name_error Error on family-name
nickname_error Error on nickname
photo-url_error Error on photo-url
global_error Any global error you may wish to display on the form submission

Building the request URL

requested_fields and required_fields are provided as a URI encoded, comma-separated list. All other fields should be added as a standard query string parameter.

Request structure

http://www.clickpass.com/process_new_openid?
site_key=<clickpass site key>
&process_openid_registration_url =<process_openid_registration_url>
&new_openid_completion_url=<new_openid_completion_url>
&logo_url=<logo_url>

&requested_fields=<comma separated list of requested fields >
&required_fields=<comma separated list of required fields >
&tos_url=<tos_url>
&privacy_policy_url=<privacy_policy_url>

&<field_name>_label=<custom label for field>
&<field_name>_label=...

&<field_name>_error=<error on field>
&<field_name>_error=...
&global_error=<global error for form>

Use of profile photos

You may hotlink directly to the profile photo provided by Clickpass. This will mean that your application is serving photos from the Clickpass servers in its pages.

However, users may at times delete photos from Clickpass which will in turn delete the photo you are hotlinking to. You are therefore strongly advised to make a local copy of all profile photos.

Labelling

All parameters have default labels but each label can be over-ridden. The default label for family-name for instance is "Last name" but you may wish to refer to it as "Family name" or "Surname". This can be done by providing a custom label.

User contributed notes

Have something to add to the docs or a question you want to ask? Get stuck in.

(We may occasionally prune notes to keep them as useful as possible to our readers)