Sign in
This API endpoint allows authenticated access by verifying user credentials. To sign in, the client sends a POST request to this endpoint with the user's email and password in the request body. Upon successful authentication, the server returns(in headers) an access token
, uid
, client token
, and Authorization
info , which can be used for authorized access to protected resources. In case of an unsuccessful authentication attempt, an error message is returned.
Query Parameters
Client API token
Request Body
Login body
login using email, or you can use login
field which support login using email or userame.
The email/username password.
email or username
- 200
- 403
- 422
Signin response
Response Headers
access-token string
user's access token
token-type string
token type
client string
client's access token
expiry string
token expiry timestamp
uid string
User's uid
Authorization string
Schema
- Array [
- ]
data object
QuranReflect User model.
The Id of the user
The email of the user
Full name of user. It is deprecated, please use first_name
and last_name
instead.
The username
true if user is a verified member
user bio
ISO code of the language that the user prefers to read posts in.
User uniqe identifier
User account provider.
User's OneSignal subscription Id.
Whether user is allowed to post as another user.
The registration Id of the user's Android device.
Possible values: [OLD USER
, web
, QR_IOS
, QR_ANDROID
, QuranMemorizer
, QF_AUTH
]
The signup type
Whether the user disabled receving emails or not.
The user's first name.
The user's last name.
Whether the user is an admin.
The user's avatar url.
rooms_list object[]
List of rooms the user is a member of.
The Id of the room
Possible values: [0
, 1
]
The type of the user. 0
= student of knowledge.1
= scholar.
{
"data": {
"id": 0,
"email": "string",
"username": "string",
"verified": true,
"follow_notification": true,
"comments_notification": true,
"description": "string",
"default_lang": "string",
"uid": "string",
"provider": "string",
"onesignal_player_id": "string",
"post_as": true,
"android_registration_id": "string",
"sign_up_type": "OLD USER",
"emails_disabled": true,
"first_name": "string",
"last_name": "string",
"is_admin?": true,
"user_avatar_url": "string",
"rooms_list": [
{
"id": "string"
}
],
"user_type": "0"
}
}
{
"data": {
"email": "naveedahmada036@gmail.com",
"username": "naveed",
"id": 1885,
"uid": "naveedahmada036@gmail.com",
"name": "Naveed Ahmad",
"verified": false,
"follow_notification": false,
"comments_notification": true,
"description": "quran.com",
"default_lang": "en",
"provider": "email",
"onesignal_player_id": null,
"post_as": true,
"android_registration_id": "value",
"sign_up_type": "OLD USER",
"emails_disabled": true,
"first_name": "naveed",
"last_name": "ahmad",
"is_admin?": true,
"user_avatar_url": null,
"rooms_list": [
[
250,
"My Room"
],
[
257,
"Pvt Group"
]
],
"user_type": "scholar"
}
}
Schema
- Array [
- ]
data object
rooms_list object[]
{
"data": {
"email": "string",
"username": "string",
"id": 0,
"uid": "string",
"name": "string",
"verified": true,
"follow_notification": true,
"comments_notification": true,
"description": "string",
"default_lang": "string",
"provider": "string",
"onesignal_player_id": "string",
"post_as": true,
"android_registration_id": "string",
"sign_up_type": "string",
"emails_disabled": true,
"first_name": "string",
"last_name": "string",
"is_admin?": true,
"user_avatar_url": "string",
"rooms_list": [
{}
],
"user_type": "string"
}
}
Forbidden, api key is missing or invalid
Schema
{
"success": true,
"message": "string"
}
{
"success": false,
"message": "You don't have permission!"
}
Unprocessable Entity, data is invalid or missing
Schema
Default value: false
Possible values: [Invalid login credentials. Please try again.
]
{
"success": false,
"errors": [
"Invalid login credentials. Please try again."
]
}
{
"success": false,
"errors": [
"Invalid login credentials. Please try again."
]
}