Site:API:Authentication

From Metrixstream
(Difference between revisions)
Jump to: navigation, search
m (Required Parameters)
m (Required Parameters)
 
(One intermediate revision by one user not shown)
Line 72: Line 72:
 
=== Required Parameters ===
 
=== Required Parameters ===
  
None.
+
* <code>action=logout</code>
  
 
=== Successful Response ===
 
=== Successful Response ===
Line 88: Line 88:
 
=== Required Parameters ===
 
=== Required Parameters ===
  
 +
* <code>action=forgotpassword</code>
 
* <code>username</code>: the username of the user; an email address can also be passed to this same field as a convenience
 
* <code>username</code>: the username of the user; an email address can also be passed to this same field as a convenience
  

Latest revision as of 22:48, 8 January 2013

Contents

[edit] Authentication

[edit] Login

This API call is responsible for logging in a user.

[edit] Authentication Restrictions

None.

[edit] Required Parameters

  • action=login
  • username: the username of the user
  • password: the password of the user

[edit] Successful Response

  • status=ok

[edit] Signup

This API call is responsible for signing up a user.

[edit] Authentication Restrictions

None.

[edit] Required Parameters

  • action=signup
  • username: the username of the user; this must adhere to the site restrictions for username requirements
  • password: the password of the user; this must adhere to the site restrictions for password requirements
  • email: the email address of the user; this must be a valid email address and not already claimed by another user

[edit] Optional Parameters

  • password2: this can be used to verify the user didn't make a typo mistake with their password choice
  • phone: the primary phone number for this user
  • fax: the primary fax number for this user
  • dob: the user's date of birth; this is
  • sex: the sex of the user
  • description: the bio of the user
  • display_name: the display name of the user; this is a non-unique field and is used for display only
  • display_status: the display status of the user; this is common for social websites
  • billing_first_name: the first name of the billing contact
  • billing_last_name: the last name of the billing contact
  • billing_company: the company name of the billing contact
  • billing_address: the address of the billing contact
  • billing_address2: an optional 2nd line for the address of the billing contact
  • billing_city: the city of the billing contact
  • billing_state: the state of the billing contact
  • billing_zip: the zip code of the billing contact
  • billing_country: the country of the billing contact
  • billing_phone: an optional phone number related to the billing contact
  • billing_fax: an optional fax number related to the billing contact
  • billing_email: an optional email related to the billing contact
  • attr:user:$name: $name should be replaced by the name of any custom fields that have been created for all user objects; make sure to set the permission of "editable" on each custom field you want the user to be able to specify themselves

[edit] Successful Response

  • status=ok

[edit] Logout

This API call is responsible for logging out a user.

[edit] Authentication Restrictions

Any authenticated user.

[edit] Required Parameters

  • action=logout

[edit] Successful Response

  • status=ok

[edit] Forgot Password

This API call is responsible for sending a forgot password email to a successful match of a username or email address.

[edit] Authentication Restrictions

None.

[edit] Required Parameters

  • action=forgotpassword
  • username: the username of the user; an email address can also be passed to this same field as a convenience

[edit] Successful Response

  • status=ok: this response is returned regardless if the param:username field actually matches a user's username or email address; the reason for this is so that someone can't run a brute force attack and discover all the email addresses that belong to your users
Personal tools