API: User Auth
koleksiuk edited this page Oct 22, 2014
·
2 revisions
{
"client_id": "client_id",
"client_secret": "client_secret",
"grant_type": "password",
"email": "test@example.com",
"password": "test1234"
}
{
"access_token":"fc8de38185a6e531be5e6f1dfc5807b5789c82647f34ad6f045c54172becc43d",
"token_type":"bearer",
"expires_in":7200,
"refresh_token":"8bb60a361a8deaa8e284c64aa7dc2bbd5c437b274b8a8f7840a6ace3032efae9"
}
{
"error":"invalid_resource_owner",
"error_description":"The provided resource owner credentials are not valid, or resource owner cannot be found"
}
POST /oauth/token.json
{
"client_id":"client_id",
"client_secret":"client_secret",
"grant_type":"password",
"provider":"facebook",
"token":"token_received_from_facebook"
}
Note: token_received_from_facebook should allow to get email, profile picture & list of friends