This API helps you to get current user details like name, email address, whether or not current user is an agent, agent capabilities, etc.
HTTP Request
/wp-json/supportcandy/v2/current-user
Example
curl --location --request GET 'http://localhost/wp-json/supportcandy/v2/current-user' \
--header 'Authorization: Basic YWRtaW46bjVJWSBYc3pUIGlxN3MgSHhKWCA3YVdBIDlOblI='
Example Response
{
"name": "John Doe",
"email": "johndoe@test.com",
"is_agent": true,
"agent_caps": {
"view-unassigned": true,
"view-assigned-me": true,
"view-assigned-others": true,
"reply-unassigned": true,
"reply-assigned-me": true,
"reply-assigned-others": true,
"pn-unassigned": true,
"pn-assigned-me": true,
"pn-assigned-others": true,
"aa-unassigned": true,
"aa-assigned-me": true,
"aa-assigned-others": true,
"cs-unassigned": true,
"cs-assigned-me": true,
"cs-assigned-others": true,
"ctf-unassigned": true,
"ctf-assigned-me": true,
"ctf-assigned-others": true,
"caof-unassigned": true,
"caof-assigned-me": true,
"caof-assigned-others": true,
"crb-unassigned": true,
"crb-assigned-me": true,
"crb-assigned-others": true,
"eth-unassigned": true,
"eth-assigned-me": true,
"eth-assigned-others": true,
"dth-unassigned": true,
"dth-assigned-me": true,
"dth-assigned-others": true,
"vl-unassigned": true,
"vl-assigned-me": true,
"vl-assigned-others": true,
"dtt-unassigned": true,
"dtt-assigned-me": true,
"dtt-assigned-others": true,
"ar-unassigned": true,
"ar-assigned-me": true,
"ar-assigned-others": true,
"backend-access": true,
"create-as": true,
"dtt-access": true,
"eci-access": true
}
}