🔌
Laravel API Auth Builder
  • 💎Overview
  • 🔨Install
  • 🔦Using
  • 💿API Collection
Powered by GitBook
On this page
  • Auth API
  • Register API
  • Login API
  • Active OTP
  • Resend OTP
  • Forget Password
  • Profile API
  • Get Profile
  • Update Profile
  • Update Profile Password
  • Delete My User
  • Logout User
  • Download PostMan Collection JSON

Was this helpful?

API Collection

PostMan collection for generated API

Auth API

here is a full API for not auth users we are here to use users as ex.

Register API

POST {BASE}/api/auth/users/register

Request Body

Name
Type
Description

name*

Fady Mondy

email*

info@3x1.io

password*

3x1@2022

password_confirmation*

3x1@2022

{
    "status": "success",
    "message": "User registered successfully",
    "data": {
        "name": "Fady Mondy",
        "email": "info@3x1.io",
        "updated_at": "2022-11-17T13:26:15.000000Z",
        "created_at": "2022-11-17T13:26:15.000000Z",
        "id": 5,
        "token": "3|F5wrK8yVUQcLhSWRWNpFqL6tii9lwZOZn56TgZX4",
        "profile_photo_url": "https://ui-avatars.com/api/?name=F+M&color=7F9CF5&background=EBF4FF"
    }
}

Login API

POST {BASE}/api/auth/users/login

Request Body

Name
Type
Description

email*

info@3x1.io

password*

3x1@2022

{
    "status": "success",
    "message": "Login Success",
    "data": {
        "id": 5,
        "name": "Fady Mondy",
        "email": "info@3x1.io",
        "email_verified_at": null,
        "two_factor_confirmed_at": null,
        "current_team_id": null,
        "profile_photo_path": null,
        "created_at": "2022-11-17T13:26:15.000000Z",
        "updated_at": "2022-11-17T13:26:15.000000Z",
        "lang": "en",
        "token": "4|Nob5INJ7ojtAh5jY1FlaSRTsQUkXraPaWMNBVEfV",
        "profile_photo_url": "https://ui-avatars.com/api/?name=F+M&color=7F9CF5&background=EBF4FF"
    }
}

Active OTP

POST {BASE}/api/auth/users/otp

Request Body

Name
Type
Description

otp_code*

138750

email*

info@3x1.io

{
    "status": "success",
    "message": "your Account has been activated",
    "data": null
}

Resend OTP

POST {BASE}/api/auth/users/resend

Request Body

Name
Type
Description

email*

info@3x1.io

{
    "status": "success",
    "message": "An OTP Has been send to your tel please check it",
    "data": null
}

Forget Password

POST {BASE}/api/auth/users/reset

Request Body

Name
Type
Description

email*

info@3x1.io

password*

3x1@2022

password_confirmation*

3x1@2022

{
    "status": "success",
    "message": "Password Reset",
    "data": null
}

Profile API

when you use Bearer token on the request you can get this method

Get Profile

GET {BASE}/api/auth/users/profile

Headers

Name
Type
Description

Authorization*

Bearer 2|yCxPfI6KWO5COyj5DKhEnhyBfnPSTHIdPLYctMTy

{
    "status": "success",
    "message": "Profile Data Load",
    "data": {
        "id": 5,
        "name": "Fady Mondy",
        "email": "info@3x1.io",
        "email_verified_at": null,
        "two_factor_confirmed_at": null,
        "current_team_id": null,
        "profile_photo_path": null,
        "created_at": "2022-11-17T13:26:15.000000Z",
        "updated_at": "2022-11-17T13:35:59.000000Z",
        "lang": "en",
        "profile_photo_url": "https://ui-avatars.com/api/?name=F+M&color=7F9CF5&background=EBF4FF"
    }
}

Update Profile

POST {BASE}/api/auth/users/update

Headers

Name
Type
Description

Authorization*

Bearer 2|yCxPfI6KWO5COyj5DKhEnhyBfnPSTHIdPLYctMTy

Request Body

Name
Type
Description

email

admin@3x1.io

{
    "status": "success",
    "message": "Profile Data Updated",
    "data": {
        "id": 5,
        "name": "Fady Mondy",
        "email": "admin@3x1.io",
        "email_verified_at": null,
        "two_factor_confirmed_at": null,
        "current_team_id": null,
        "profile_photo_path": null,
        "created_at": "2022-11-17T13:26:15.000000Z",
        "updated_at": "2022-11-17T13:41:05.000000Z",
        "lang": "en",
        "profile_photo_url": "https://ui-avatars.com/api/?name=F+M&color=7F9CF5&background=EBF4FF"
    }
}

Update Profile Password

POST {BASE}/api/auth/users/password

Headers

Name
Type
Description

Authorization

Bearer 2|yCxPfI6KWO5COyj5DKhEnhyBfnPSTHIdPLYctMTy

Request Body

Name
Type
Description

password*

3x1@2021

password_confirmation*

3x1@2021

{
    "status": "success",
    "message": "Password Updated",
    "data": null
}

Delete My User

DELETE {BASE}/api/auth/users/destroy

Headers

Name
Type
Description

Authorization*

Bearer 2|yCxPfI6KWO5COyj5DKhEnhyBfnPSTHIdPLYctMTy

{
    "status": "success",
    "message": "Account Has Been Deleted",
    "data": null
}

Logout User

POST {BASE}/api/auth/users/logout

Request Body

Name
Type
Description

Authorization*

Bearer 2|yCxPfI6KWO5COyj5DKhEnhyBfnPSTHIdPLYctMTy

{
    "status": "success",
    "message": "Logout Success",
    "data": null
}

Download PostMan Collection JSON

you can download the collection from here

Last updated 2 years ago

Was this helpful?

💿
8KB
Laravel Auth Builder.postman_collection.json