Description:

This API return the details of a authenticate user in Faveo.

URL:   api/v1/authenticate/user

(Replace this URL with you helpdesk URL)

Parameters :

Name Data Type Required / Optional Description
api_key String Optional An alphanumeric code that can be used to authenticate your API calls
token String Required Token generated for a user

HTTP Method: GET

  •   URL Request Example:

https://www.stablehelpdesk.faveodemo.com/api/v1/authenticate/user?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9wcm9kdWN0ZGVtb3VybC5jb20vc2FyZnJhei9wdWJsaWMvYXBpL3YxL2F1dGhlbnRpY2F0ZSIsImlhdCI6MTUzNDc0NzMzMSwiZXhwIjoxNTM0NzQ3NTcxLCJuYmYiOjE1MzQ3NDczMzEsImp0aSI6IlBlQWdFSEt6Y3Rpc0h3dXkifQ.5CTfqjh26q1s9iYuIC5G4_fwIGPP-m00HyvH02DhUIw

Response

  •   Response Format : JSON
  •   Returns JSON which contains user details.

Sample JSON Success Response :

{

 "user": {

"id": 4,

"user_name": "teamLead",

"first_name": "team",

"last_name": "lead",

"gender": "0",

"email": "faveoforkteam1@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": "79",

"daylight_save": "",

"limit_access": "",

"directory_listing": "",

"vacation_mode": "",

"company": "",

"role": "agent",

"internal_note": "",

"profile_pic": "https://secure.gravatar.com/avatar/31513cf500e5b442f9fb2b3b17bfd6f7?s=80&r=g&d=identicon",

"created_at": "2017-02-25 05:35:11",

"updated_at": "2017-02-25 05:35:11",

"is_login": "0",

"not_accept_ticket": "0"

 }

Response Description:

Parameter            Description
user It contains JSON

user:  It contain all user data.

       Parameter                                                  Description
            id It is a unique id of authenticated user (Example: id=43)
  user_name It is the username of authenticated user (Example: salmon)
first_name It is the first name of the logged user (Example: first_name=Manas)
last_name It is the last name of the logged user (Example: last_name=Lotik)
email It is the last email of the logged user (Example: email=jayesh.k@gmail.com)
role It gives the role of the  logged in user in helpdesk (Example: role: User or role=Agent or role=Admin)
gender It is the gender. (Example: male(gender=1) or female(gender=0) )
ban It tells the authenticated user/agent is banned or not. ( Example: If ban=0 not banned and if ban=1 it is banned )
active It tells user is active or inactive. (Example: If active=1 then the user is active and if active=0 then the user is not active )
    is_delete It tells user is deleted or not.  (Example: If is_delete=1 then the user is deleted and if is_delete=0 then the user is not deleted )
country_code It is country code of mobile. (Example: +91)
phone_number It is the phone number of the authenticated user (Example: 56336641)
mobile It is the mobile number of the authenticated user (Example: 9158696969)
primary_dpt It gives the department name associated with an authenticated user.
agent_tzone It is the timezone  of the agent
company It gives the name of the company. (Example: company=SLS Technology)
profile_pic It gives the profile picture or gives a gravatar image.
created_at It gives the time that when a user/agent is created. (Example: created_at= 2017-03-29 07:23:28 )
updated_at It gives the time that when a user/agent profile is created. (Example: updated_at = 2018-08-17 09:59:14)
user_language It returns the user language in helpdesk (Example: user_language= en)
location IT gives the location of user. (Example: location=Bangalore)
mobile_otp_verify It tells that a user/agent is verified via mobile number or not. (Example: If mobile_otp_verify=1 then it is verified and if mobile_otp_verify=0 then it is not verified)
email_verify It tells that a user/agent is verified via email or not. (Example: If email_verify=1 then it is verified and if email_verify=0 then it is not verified)

Possible Errors/Failures:

When invalid credentials are provided or no credentials are provided at all

{

"success": false,

"message": “invalid credentials”

}

OR

*Please check the responses for some common errors

Leave a Reply

Your email address will not be published. Required fields are marked *