Site:API:Authentication
From Metrixstream
(Difference between revisions)
MetrixAdmin (Talk | contribs) (→Logout) |
MetrixAdmin (Talk | contribs) (→Signup) |
||
Line 19: | Line 19: | ||
* <code>status=ok</code> | * <code>status=ok</code> | ||
− | = Signup = | + | == Signup == |
+ | |||
+ | This API call is responsible for signing up a user. | ||
+ | |||
+ | === Authentication Restrictions === | ||
+ | |||
+ | None. | ||
+ | |||
+ | === Required Parameters === | ||
+ | |||
+ | * <code>username</code>: the username of the user; this must adhere to the site restrictions for username requirements | ||
+ | * <code>password</code>: the password of the user; this must adhere to the site restrictions for password requirements | ||
+ | * <code>email</code>: the email address of the user; this must be a valid email address and not already claimed by another user | ||
+ | |||
+ | === Optional Parameters === | ||
+ | |||
+ | * <code>password2</code>: this can be used to verify the user didn't make a typo mistake with their password choice | ||
+ | * <code>phone<code>: the primary phone number for this user | ||
+ | * <code>fax<code>: the primary fax number for this user | ||
+ | * <code>dob<code>: the user's date of birth; this is | ||
+ | * <code>sex<code>: the sex of the user | ||
+ | * <code>description<code>: the bio of the user | ||
+ | * <code>display_name<code>: the display name of the user; this is a non-unique field and is used for display only | ||
+ | * <code>display_status<code>: the display status of the user; this is common for social websites | ||
+ | * <code>billing_first_name<code>: the first name of the billing contact | ||
+ | * <code>billing_last_name<code>: the last name of the billing contact | ||
+ | * <code>billing_company<code>: the company name of the billing contact | ||
+ | * <code>billing_address<code>: the address of the billing contact | ||
+ | * <code>billing_address2<code>: an optional 2nd line for the address of the billing contact | ||
+ | * <code>billing_city<code>: the city of the billing contact | ||
+ | * <code>billing_state<code>: the state of the billing contact | ||
+ | * <code>billing_zip<code>: the zip code of the billing contact | ||
+ | * <code>billing_country<code>: the country of the billing contact | ||
+ | * <code>billing_phone<code>: an optional phone number related to the billing contact | ||
+ | * <code>billing_fax<code>: an optional fax number related to the billing contact | ||
+ | * <code>billing_email<code>: an optional email related to the billing contact | ||
+ | * <code>attr:user:$name</code>: $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 | ||
+ | |||
+ | === Successful Response === | ||
+ | |||
+ | * <code>status=ok</code> | ||
== Logout == | == Logout == |
Revision as of 22:42, 8 January 2013
Contents |
Authentication
Login
This API call is responsible for logging in a user.
Authentication Restrictions
None.
Required Parameters
-
action=login
-
username
: the username of the user -
password
: the password of the user
Successful Response
-
status=ok
Signup
This API call is responsible for signing up a user.
Authentication Restrictions
None.
Required Parameters
-
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
Optional Parameters
-
password2
: this can be used to verify the user didn't make a typo mistake with their password choice -
phone<code>: the primary phone number for this user
- <code>fax<code>: the primary fax number for this user
- <code>dob<code>: the user's date of birth; this is
- <code>sex<code>: the sex of the user
- <code>description<code>: the bio of the user
- <code>display_name<code>: the display name of the user; this is a non-unique field and is used for display only
- <code>display_status<code>: the display status of the user; this is common for social websites
- <code>billing_first_name<code>: the first name of the billing contact
- <code>billing_last_name<code>: the last name of the billing contact
- <code>billing_company<code>: the company name of the billing contact
- <code>billing_address<code>: the address of the billing contact
- <code>billing_address2<code>: an optional 2nd line for the address of the billing contact
- <code>billing_city<code>: the city of the billing contact
- <code>billing_state<code>: the state of the billing contact
- <code>billing_zip<code>: the zip code of the billing contact
- <code>billing_country<code>: the country of the billing contact
- <code>billing_phone<code>: an optional phone number related to the billing contact
- <code>billing_fax<code>: an optional fax number related to the billing contact
- <code>billing_email<code>: an optional email related to the billing contact
- <code>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
Successful Response
-
status=ok
Logout
This API call is responsible for logging out a user.
Authentication Restrictions
Any authenticated user.
Required Parameters
None.
Successful Response
-
status=ok