API
Profiles.im has a simple API that allows your application to retrieve extended profile information on any user, update existing profiles and create new ones.
The API is very simple to use, but does require an API key. If you'd like a key for your application, just email us and tell us your application name and URL, as well as a little background information on how you plan to use the API.
Instructions
API Requests should be sent to http://profiles.im/api/request/ via either GET or POST.
All API requests require at least two parameters:
- apiKey
- Your unique API key.
- request
- The API request method you with to execute. You may need to supply additional parameters, depending on the request you are making.
And one optional parameter:
- outputMethod (json|xml)
- Whether the API should return results as a Javascript object (json) or in XML. Defaults to XML
Methods & Parameters
| Method | Parameters | Possible Responses |
|---|---|---|
getProfileFromTwitterUsername |
twitterUsername(user's Twitter login) |
200: profile object404: User not found |
getProfileFromUsername |
username(user's profiles.im username) |
200: profile object
404: User not found |
getUrlFromTwitterUsername |
twitterUsername |
200: profiles.im URL 404: User not found |
createProfile |
twitterUsernametwitterPasswordrequestUsername(The requested profiles.im username) |
200: success 401: Incorrect twitter username/password 403: Requested username not available 405: User already has profile 406: Error retrieveing profile from twitter 407: Unable to save profile |
deleteProfile |
twitterUsernametwitterPassword |
200: deleted 401: Incorrect twitter ssername/password 404: User not found 407: Unable to delete profile |
updateProfile |
twitterUsernametwitterPasswordprofilefields...(a list of any valid profile fields) |
200: profile object401: Incorrect twitter username/password 404: User not found 407: Unable to update profile 408: Unchanged |
All methods and parameters are case insensitve.
Results
Results are returned in either JSON or XML, and have the following structure:
- response
- Container for the response- status
- A three figure status code (similar to HTTP status codes) reflecting the success or failure of your request. - error
- Any associated error message text. - apiversion
- The version of the API currently in use. - results
- The results data from your request. Depending on the request, this may be an integer, string or an object.
- status
Sample Requests
Note: Do not use the API key shown in these examples. It will break your application!
