First of all, Hello,
I was wondering if there is a way to identify the user based on the API Token. As we have a need to know who is subject that wants to utilise certain services that depend on FreshDesk API.
Is there a way that this can be achieved, or maybe something planned for the future?
Hi @sakile ,
Welcome to the community!
API token is specific to the account and you can get the account details using the
/api/v2/account. Sample response for your reference
account_name: "Daily Planet",
timezone: "Eastern Time (US & Canada)",
city: San Mateo CA ,
street: S. Delaware Street,
Reference for the same - Freshdesk
Let me know if this helps. Thanks
Thanks for the welcome, and for the reply!
Yes I noticed the mentioned /account API, however It seams only to be available for the admins. I would not be possible to identify non admin users?
Yes, unfortunately, non-admin users can’t able to access the API as per documentation.
not be possible to identify non-admin users?
If you want to identify the user role, you can use the below endpoint to get the roles. Only users with admin privileges can access the below endpoint
https://domain.freshdesk.com/api/v2/roles below is the sample response.
"id" : 1,
"name" : "Account Administrator",
"description" : "Has complete control over the help desk including access to Account or Billing related information, and receives Invoices.",
"default" : true,
"created_at" : "2016-02-29T06:32:28Z",
"updated_at" : "2016-02-29T06:32:28Z"
Now from the logged-in user object, you can find the
role_ids key which will be the array if the ID ( To get the role id you can use the above API ) of the Admin role is present in the array, then the logged-in user is an admin.
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.