-
Notifications
You must be signed in to change notification settings - Fork 0
SignUp
Jan Zimandl edited this page Jan 25, 2016
·
4 revisions
- Facebook Sign Up - POST /signup/facebook
- Twitter Sign Up - POST /signup/twitter
- Email Sign Up - POST /signup/email
POST /signup/facebook HTTP/1.1
Content-Type: application/json
{
"facebook_token": "sadkjfhaskdzjfiasz"
}
Parameter | Length | Optional | More info |
---|---|---|---|
facebook_token | no | fb access token |
HTTP/1.1 200 OK
{
"success": true,
"result": {
"user_id": 1,
"email": "[email protected]",
"first_name": "First",
"last_name": "Last",
"photo_url": "http://image.jpg",
"location_name": "Location, CA",
"is_tastemaker": false,
"score": 0,
"facebook_name": "Name",
"twitter_name": null,
"signup_type": "Facebook",
"just_created": true,
"access_token": "NFSAjOHIgqvMAkRIwjQKk2Dp"
}
}
Parameter | Optional | More info |
---|---|---|
user_id | no | |
no | ||
first_name | no | |
last_name | no | |
photo_url | no | |
location_name | yes | |
is_tastemaker | no | |
score | no | |
facebook_name | yes | |
twitter_name | no | |
signup_type | no | |
just_created | no | |
access_token | no |
Name | Description |
---|---|
FacebookUnauthorized | Invalid facebook access token. |
FacebookAccountAlreadyUsed | Another user is using this FB account for signup |
POST /signup/twitter HTTP/1.1
Content-Type: application/json
{
"twitter_token": "sadkjfhaskdzjfiasz",
"twitter_token_secret": "dfhtyjdhsgdfjgd"
}
Parameter | Length | Optional | More info |
---|---|---|---|
twitter_token | no | tw access token | |
twitter_token_secret | no | tw token secret |
HTTP/1.1 200 OK
{
"success": true,
"result": {
"user_id": 1,
"email": "[email protected]",
"first_name": "First",
"last_name": "Last",
"photo_url": "http://image.jpg",
"location_name": "Location, CA",
"is_tastemaker": false,
"score": 0,
"facebook_name": null,
"twitter_name": "Name",
"signup_type": "Twitter",
"just_created": true,
"access_token": "NFSAjOHIgqvMAkRIwjQKk2Dp"
}
}
Parameter | Optional | More info |
---|---|---|
user_id | no | |
no | ||
first_name | no | |
last_name | no | |
photo_url | no | |
location_name | yes | |
is_tastemaker | no | |
score | no | |
facebook_name | yes | |
twitter_name | no | |
signup_type | no | |
just_created | no | |
access_token | no |
Name | Description |
---|---|
TwitterUnauthorized | Invalid Twitter access tokens. |
TwitterAccountAlreadyUsed | Another user is using this TW account for signup |
POST /signup/email HTTP/1.1
Content-Type: application/json
{
"email": "[email protected]",
"password": "fsdxgsdfadg",
"first_name": "First",
"last_name": "Last"
}
Parameter | Length | Optional | More info |
---|---|---|---|
no | user's email | ||
password | no | user's password | |
first_name | no | user's first name | |
last_name | no | user's last name |
HTTP/1.1 200 OK
{
"success": true,
"result": {
"user_id": 1,
"email": "[email protected]",
"first_name": "First",
"last_name": "Last",
"photo_url": "http://image.jpg",
"location_name": "Location, CA",
"is_tastemaker": false,
"score": 0,
"facebook_name": null,
"twitter_name": null,
"signup_type": "Email",
"just_created": true,
"access_token": "NFSAjOHIgqvMAkRIwjQKk2Dp"
}
}
Parameter | Optional | More info |
---|---|---|
user_id | no | |
no | ||
first_name | no | |
last_name | no | |
photo_url | no | |
location_name | yes | |
is_tastemaker | no | |
score | no | |
facebook_name | yes | |
twitter_name | yes | |
signup_type | no | |
just_created | no | |
access_token | no |
Name | Description |
---|---|
EmailAlreadyUsed | Email used by another user for sign up |