πΉVideo Chat App
https://webrtc-on-rails.herokuapp.com
Authentication Using Devise Token Auth
POST Endpoint:
https://webrtc-on-rails.herokuapp.com/api/v1/auth
Request Body:
{
"email": "[email protected]",
"password": "foobar",
"password_confirmation": "foobar"
}
200 - Response Body:
{
"status": "success",
"data": {
"id": 1,
"email": "[email protected]",
"provider": "email",
"uid": "[email protected]",
"created_at": "2017-10-06T05:22:49.774Z",
"updated_at": "2017-10-06T05:22:49.998Z"
}
}
200 - Response Headers: (these must be passed along every authenticated request)
access-token β fdBnuoN8VtlOLLW-cKB58Q
token-type β Bearer
client β ucLUd-EIkM-ETYLWFSIL4w
expiry β 1508475926
uid β [email protected]
422 - Response Body:
{
"status": "error",
"data": {
"id": null,
"email": "[email protected]",
"created_at": null,
"updated_at": null,
"provider": "email",
"uid": "[email protected]"
},
"errors": {
"email": [
"has already been taken"
],
"full_messages": [
"Email has already been taken"
]
}
}
POST Endpoint:
https://webrtc-on-rails.herokuapp.com/api/v1/auth/sign_in
Request Body:
{
"email": "[email protected]",
"password": "foobar"
}
200 - Response Body:
{
"data": {
"id": 1,
"email": "[email protected]",
"provider": "email",
"uid": "[email protected]"
}
}
200 - Response Headers: (these must be passed along every authenticated request)
access-token β fdBnuoN8VtlOLLW-cKB58Q
token-type β Bearer
client β ucLUd-EIkM-ETYLWFSIL4w
expiry β 1508475926
uid β [email protected]
401 - Response Body:
{
"errors": [
"Invalid login credentials. Please try again."
]
}