POST oauth/login/users
(Difference between revisions)
(→Request) |
|||
Line 34: | Line 34: | ||
== Authentication == | == Authentication == | ||
− | This API requires Login App Token authentication. See [[ | + | This API requires Login App Token authentication. See [[OAuth_APIs|OAuth]]. |
== Response == | == Response == | ||
Line 47: | Line 47: | ||
|- | |- | ||
! align="left" width="200px" | unauthorized (401) | ! align="left" width="200px" | unauthorized (401) | ||
− | | The authentication is wrong. See [[ | + | | The authentication is wrong. See [[OAuth_APIs|OAuth]]. |
|- | |- | ||
! align="left" width="200px" | unprocessable_entity (422) | ! align="left" width="200px" | unprocessable_entity (422) |
Revision as of 15:43, 12 August 2015
Contents |
Description
Creates a new user manually, given username and/or e-mail.
Resource URL
POST https://api.socialidnow.com/v2/marketing/login/users
Parameters
JSON Parameters
user | required | a hash in the format field:value, with the necessary fields to create an user: |
---|---|---|
username 1 | optional | username. |
email_address 1 | optional | user e-mail address. |
password | optional | user password. |
1 At least one of these fields must be given.
Authentication
This API requires Login App Token authentication. See OAuth.
Response
Response Status
created (201) | The user was created successfully. |
---|---|
bad_request (400) | Some required parameter was not informed. |
unauthorized (401) | The authentication is wrong. See OAuth. |
unprocessable_entity (422) | Validation error in the field "user". |
internal_server_error (500) | An unknown error happened. |
Examples
Request
Creates a new user.
curl -iX POST 'https://api.socialidnow.com/v2/marketing/login/users' \ -d '{ "user": { "username":"new_user", "email_address":"new_user@user_domain.com", "password":"new_user_secret" } }' \ -H "Content-type: application/json" \ -H "Authentication: Bearer 0358172c0cd160dfa731c7a76284fe0c30580f3fc8d827831e9f8b1821d8124c"
Response
Response Headers
HTTP/1.1 201 Created Location: 'https://api.socialidnow.com/v1/marketing/login/users/341' Status: 201