Skip to content

Get Authenticated User

Sayar Samanta edited this page Aug 28, 2018 · 4 revisions

Description : This api return the details of authenticated user

  1. URL : api/v1/authenticate/user

Parameters :

Name Data Type Required/Optional Description
api_key String Optional An alphanumeric code that can be used to authenticate your API calls. To make it required login to Admin panel and go to API setting and make it mandatory
token String Required token generated for a user

HTTP Method : GET

Response Format : JSON

Response : Returns user details on success and error message on failure

URL Request Example : http://www.stablehelpdeskc.faveodemo.com/api/v1/authenticate/user?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9wcm9kdWN0ZGVtb3VybC5jb21cL2NvbW11bml0eVwvcHVibGljXC9hcGlcL3YxXC9hdXRoZW50aWNhdGUiLCJpYXQiOjE1MzUwMDg0MDYsImV4cCI6MTUzNTAwODY0NiwibmJmIjoxNTM1MDA4NDA2LCJqdGkiOiJ0Rmgxb3pnaklWN3dwZUFvIiwic3ViIjoxLCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.FBLHZQXAvuacZmbJcOweK8wQbqOzMqXuzQuihi2R_nk

JSON Response Example :

Success Response :

{
    "user": {
        "id": 1,
        "user_name": "demoadmin",
        "first_name": "Demo",
        "last_name": "Admin",
        "gender": 0,
        "email": "mr.dmartin1984@gmail.com",
        "ban": 0,
        "active": 1,
        "is_delete": 0,
        "ext": "",
        "country_code": 0,
        "phone_number": "",
        "mobile": null,
        "agent_sign": "",
        "account_type": "",
        "account_status": "",
        "assign_group": 1,
        "primary_dpt": 1,
        "agent_tzone": "",
        "daylight_save": "",
        "limit_access": "",
        "directory_listing": "",
        "vacation_mode": "",
        "company": "",
        "role": "admin",
        "internal_note": "",
        "profile_pic": "https://secure.gravatar.com/avatar/b4bfa60e2b38b40cf980d30da5f6373b?s=80&r=g&d=identicon",
        "created_at": "2018-08-13 14:22:49",
        "updated_at": "2018-08-13 14:23:14",
        "user_language": null
    }
}

Some Common Error :

Error Response : If the token is expired

{
“error":"Token has expired"
}

If the token is not provided

{
    "success": false,
    "message": "Token not provided"
}

Response Description :

Parameter Description
id id of the user
user_name user name of the user
first_name first name of the user
last_name last name of the user
gender gender of the user
email email of the user
ban indicates if the user is banned or not
active indicates if the user is active or not
is_delete indicates if the user is deleted or not
ext indicates extension of the phone number
country_code indicates the country code of the user
phone_number phone number of the user
mobile mobile number of the user
agent_sign id of the user
account_type indicates the type of the user account
account_status indicates the status of the user account
assign_group indicates the group in which the user is assigned to
primary_dpt indicates the primary department of the user
agent_tzone indicates the time zone of the user
daylight_save id of the user
limit_access id of the user
directory_listing id of the user
vacation_mode id of the user
company indicates the company of the user
role indicates the role of the user
internal_note id of the user
created_at indicates when the user profile is created
profile_pic id of the user
updated_at indicates when the user profile is last updated
user_language indicates the user language

Installation and Upgrade Guide

Administrator's Guide

Agent's Guide

Email Integration

Release & Upgrade Notes

Known Issues

Contribute & Feedback

Knowledge Base

Third Party Integration

Plugins

API

Clone this wiki locally