Authentication
APIs related to Login and Registration
Login (email)
POST https://multiply.arbre.in/api/login
This endpoint allows you to authenticate a user using email
Headers
Accept
string
application/json
Request Body
type
string
string
email of user
password
string
password of user
{
"status": true,
"accessToken": "2|eiSgXjGLzJgWDWEpOrQP9Zz70cFvYRS5LGcVrAde"
}{
"status": false,
"message": "Incorrect password"
}{
"status": false,
"message": "User not found"
}{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email field is required."
],
"password": [
"The password field is required."
]
}
}login (otp)
POST https://multiply.arbre.in/api/login
This endpoint allows you to authenticate a user using email
Headers
Accept
string
application/json
Request Body
type
string
otp
phone_number
string
phone number of user
{
"status": true,
"token": "1101",
"message": "OTP generated"
}{
"status": false,
"message": "User not found"
}{
"message": "The given data was invalid.",
"errors": {
"phone_number": [
"The phone number field is required."
]
}
}Register
POST https://multiply.arbre.in/api/register
This endpoint will create a user from given data and also generate an OTP to verify valid phone number.
Headers
Accept
string
application/json
Request Body
terms
integer
1
name
string
full name
dob
string
yyyy-mm-dd
gender
string
male/female/prefer not to say
string
unique email
phone_number
string
unique phone number
{
"status": true,
"token": "8930",
"message": "OTP generated",
"data": {
"name": "MrinmaiSharma",
"dob": "1997-12-15",
"gender": "male",
"email": "[email protected]",
"phone_number": "7399479451",
"role": "user",
"username": "mrinmaisharma1",
"updated_at": "2021-10-02T11:50:13.000000Z",
"created_at": "2021-10-02T11:50:13.000000Z",
"id": 3,
"profile_photo_url": "https://ui-avatars.com/api/?name=MrinmaiSharma&color=7F9CF5&background=EBF4FF"
}
}{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"dob": [
"The dob field is required."
],
"gender": [
"The gender field is required."
],
"phone_number": [
"The phone number field is required."
],
"terms": [
"The terms field is required."
]
}
}Verify OTP
POST https://multiply.arbre.in/api/verify-otp
This endpoint will allow you to validate an OTP for a given phone number
Headers
Accept
string
application/json
Request Body
phone_number
string
user's phone number
otp
string
OTP entered by the user
{
"status": true,
"accessToken": "2|eiSgXjGLzJgWDWEpOrQP9Zz70cFvYRS5LGcVrAde"
}{
"status": false,
"message": "OTP is not valid"
}Last updated
Was this helpful?