Current User

APIs related to Current user

Current user

GET https://example.com/api/user

This endpoint will return user information if a valid accessToken is provided as a Bearer token You can use the login API to generate fresh accessToken

Headers

Name
Type
Description

Authorization

string

Bearer 7|vC2gUQC8ajaMOa2juAnaiE4ZLgmH5dcbCDY8Hwsy

Accept

string

application/json

{
    "id": 1,
    "name": "Full Name",
    "email": "[email protected]",
    "phone_number": "9876543210",
    "role": "student",
    "email_verified_at": null,
    "current_team_id": null,
    "profile_photo_path": null,
    "created_at": "2021-04-20T00:28:09.000000Z",
    "updated_at": "2021-04-24T10:00:06.000000Z",
    "deleted_at": null,
    "profile_photo_url": "https://ui-avatars.com/api/?name=Full+Name&color=7F9CF5&background=EBF4FF"
}

Batches

GET https://example.com/api/user/batches

This endpoint will return a list of batches that the current user is assigned to, if a valid accessToken is provided as a Bearer token You can use the login API to generate fresh accessToken

Headers

Name
Type
Description

Authorization

string

Bearer 7|vC2gUQC8ajaMOa2juAnaiE4ZLgmH5dcbCDY8Hwsy

Accespt

string

application/json

Courses

GET https://example.com/api/user/courses

This endpoint will return a list of batches that the current user is assigned to, if a valid accessToken is provided as a Bearer token You can use the login API to generate fresh accessToken

Headers

Name
Type
Description

Authorization

string

Bearer 7|vC2gUQC8ajaMOa2juAnaiE4ZLgmH5dcbCDY8Hwsy

Accept

string

application/json

Last updated

Was this helpful?