-
Notifications
You must be signed in to change notification settings - Fork 9
API Tokens
Nikola Begedin edited this page Nov 17, 2015
·
9 revisions
Used to log in as a regular or facebook user
// request format
// application/x-www-form-urlencoded; charset=utf-8
grant_type: 'password'
username: <user_email>,
password: <user_password>
// response format
{
access_token: <token_string>,
expires_in: <time_in_seconds>,
token_type: 'bearer',
user_id: <user_id>,
created_at: <time_of_creation_as_integer>
}
- The request format is the same, except the username needs to be set to 'facebook', and the password is actually the Facebook access token retrieved by using whichever Facebook SDK or API the client uses.
// request format
{
username: 'facebook',
password: <facebook_access_token>
}
// response format
{
access_token: <token_string>,
expires_in: <time_in_seconds>,
token_type: 'bearer',
user_id: <user_id>
}