Authentication
Authentication with the API is done using authorization tokens. However, most public API endpoints do not require a token, making it easy for users to get started without one. For scenarios where a token is required, it can be managed using the following endpoints. Authentication is performed by setting the authorization token in a header.
Examples of authenticating via the API can be found in our GitHub repository. Additionally, here is an example using curl:
curl -H "Authorization: api AUTHTOKEN" \
-H "X-App-Id: FEDCBA0987654321"
POST
/user/token
Create an authorization token for an existing user account using the provided credentials.
Request Body
-
email —
Required —
string
-
Account's email address.
-
password —
Required —
string
-
Account's password.
Response
{
"username": "iRobot",
"unique_username": "irobot",
"userid": 1,
"image": {
"id": 146016,
"mini": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.mini",
"thumbnail": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.thumbnail",
"standard": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.standard",
"medium": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.medium",
"large": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.large",
"original": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P"
},
"reputation": 0,
"teams": [
1
],
"links": {
"manage": "\/Manage"
},
"join_date": 1253855471,
"certification_count": 0,
"badge_counts": {
"bronze": 1093,
"silver": 460,
"gold": 230,
"total": 1783
},
"summary": "I'm a little robot, short and stout. I own the iFixit repair guides from past years, and negative reputation from flagging and deleting spam posts is assigned to me.",
"about_raw": "[image|66427|size=medium|align=center]",
"about_rendered": "<div class=\"imageBox_center\" style=\"width:269px\"><img src=\"https:\/\/www.ifixit.com\/igi\/CE4caKTjZxtrjMrS.medium\" width=\"267\" height=\"444\" alt=\"Block Image\" onclick=\"window.open('https:\/\/www.ifixit.com\/igi\/CE4caKTjZxtrjMrS', '', 'width=300,height=500')\" class=\"hasLarge\" \/><\/div>",
"langid": "en",
"authToken": "0123456789abcdef0123456789abcdef"
}
POST
/users/reset_password
Request a password reset for a given email. Given that the specified email address has an account, send a password reset link to the email address
Request Body
-
email —
Required —
string
-
User's email address.
Response
{
"message": "Successfully sent a email containing a password reset link"
}
POST
/users
Register a new user account. You must be logged in as an Admin to create new user accounts on sites with public registration disabled. Limited to legacy API users who have been granted an app id.
Request Body
-
email —
Required —
string
-
User's email address. Must be unique amongst users.
-
username —
Required —
string
-
Display name that is used throughout the site. Many users choose to use their real names.
-
unique_username —
Required —
string
-
Unique username that is used throughout the site and can be used to @mention people in comments.
-
password —
Required —
string
-
Account password.
Response
{
"username": "iRobot",
"unique_username": "irobot",
"userid": 1,
"image": {
"id": 146016,
"mini": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.mini",
"thumbnail": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.thumbnail",
"standard": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.standard",
"medium": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.medium",
"large": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.large",
"original": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P"
},
"reputation": 0,
"teams": [
1
],
"links": {
"manage": "\/Manage"
},
"join_date": 1253855471,
"certification_count": 0,
"badge_counts": {
"bronze": 1093,
"silver": 460,
"gold": 230,
"total": 1783
},
"summary": "I'm a little robot, short and stout. I own the iFixit repair guides from past years, and negative reputation from flagging and deleting spam posts is assigned to me.",
"about_raw": "[image|66427|size=medium|align=center]",
"about_rendered": "<div class=\"imageBox_center\" style=\"width:269px\"><img src=\"https:\/\/www.ifixit.com\/igi\/CE4caKTjZxtrjMrS.medium\" width=\"267\" height=\"444\" alt=\"Block Image\" onclick=\"window.open('https:\/\/www.ifixit.com\/igi\/CE4caKTjZxtrjMrS', '', 'width=300,height=500')\" class=\"hasLarge\" \/><\/div>",
"langid": "en",
"authToken": "0123456789abcdef0123456789abcdef"
}
DELETE
/user/token
Log out the current user by deleting the authorization token.
POST
/user/token/impersonate
Create an authorization token for the specified userid without specifying a password. Note: endpoint only accessible to authenticated admins.
Request Body
-
login —
Required —
string
-
The login email of the user to impersonate.
Response
{
"username": "iRobot",
"unique_username": "irobot",
"userid": 1,
"image": {
"id": 146016,
"mini": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.mini",
"thumbnail": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.thumbnail",
"standard": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.standard",
"medium": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.medium",
"large": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P.large",
"original": "https:\/\/www.ifixit.com\/igi\/SdCOHYQlSb3GiH1P"
},
"reputation": 0,
"teams": [
1
],
"links": {
"manage": "\/Manage"
},
"join_date": 1253855471,
"certification_count": 0,
"badge_counts": {
"bronze": 1093,
"silver": 460,
"gold": 230,
"total": 1783
},
"summary": "I'm a little robot, short and stout. I own the iFixit repair guides from past years, and negative reputation from flagging and deleting spam posts is assigned to me.",
"about_raw": "[image|66427|size=medium|align=center]",
"about_rendered": "<div class=\"imageBox_center\" style=\"width:269px\"><img src=\"https:\/\/www.ifixit.com\/igi\/CE4caKTjZxtrjMrS.medium\" width=\"267\" height=\"444\" alt=\"Block Image\" onclick=\"window.open('https:\/\/www.ifixit.com\/igi\/CE4caKTjZxtrjMrS', '', 'width=300,height=500')\" class=\"hasLarge\" \/><\/div>",
"langid": "en",
"authToken": "0123456789abcdef0123456789abcdef"
}