...
/
...
social/person/register
Info |
---|
Creates a user based on parameters passed in. Note there is a GET version of this call that follows the format /social/person/register/user/auth but is deprecated, please use the POST version. A simple web-based utility is available for managing users. |
Authentication
Required, see Auth - Login, must come from ikanow.com website on Saas, or must be admin on deployed version
Arguments
wpuser POST.setup (required)
JSON object of wordpress a user
wpauth (required)
JSON object of wordpress auth
Parameters
wpuser (required)
JSON object of wordpress user
wpauth (required)
JSON object of wordpress auth
Example
UserJSON = {and authentication following below format
Example
To use these examples: update the fields in the json objects to suit yourself (for example minimally change the fields: firstname, lastname, email, username, password)
These objects are explained in more detail on this page: User creation and updating JSON object formats
Code Block | ||
---|---|---|
| ||
SetupJSON = { "user": { "created":"Oct 21, 2011 14:13:08 PM","modified":"Oct 21, 2011 14:13:08 PM","firstname":"jill","lastname":"smith","phone":"5555555555","email":["jillsmith@ikanow.com"] |
...
}, "auth": { "password":"SHA256_HASHED_PASSWORD","accountType":"user","created":"Oct 21, 2011 14:13:08 PM","modified":"Oct 21, 2011 14:13:08 PM" } } |
Info |
---|
Dates must follow the format: MMM dd, yyyy kk:mm:ss aa as specified via java SimpleDateFormat: http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html |
...
Info |
---|
Passwords must be hashed by SHA256 into base64 (most websites hash to HEX). |
...
...
hashes.php?lang=eng#1 will perform many hashes, the 2nd SHA256 is the base64 hashed password we require. |
Info |
---|
You can use a site like: http://meyerweb.com/eric/tools/dencoder/ to encode your JSON objects before adding them to the url |
Method.Post
Code Block |
---|
curl \-XPOST 'http://infinite.ikanow.com/api/social/person/register' \-d '{ "user": {"created":"Oct 21, 2011 14:13:08 PM","modified":"Oct 21, 2011 14:13:08 PM","firstname":"jill","lastname":"smith","phone":"5555555555","email":["jillsmith@ikanow.com"]},"auth":{"username":"jillsmith@ikanow.com","password":"SHA256_HASHED_PASSWORD","accountType":"user","created":"Oct 21, 2011 14:13:08 PM","modified":"Oct 21, 2011 14:13:08 PM"}}' |
Example Response
Info | ||
---|---|---|
|
...
Common Error Messages:
|