Skip to main content
Question

Permissions Required for Accessing /api/v2/agents API

  • August 15, 2025
  • 7 replies
  • 105 views

nickwu2016
Apprentice
Forum|alt.badge.img

Want to clarify the exact permissions required to access the /api/v2/agents endpoint via API to get all users/agents’ information.

We're encountering a 403 Forbidden error as shown below when attempting to retrieve agent data, even though the API credentials appear valid.

session.get(' https://<mycompany>.freshservice.com/api/v2/agents').text
'{"code":"access_denied","message":"You are not authorized to perform this action."}'

 

Which specific role or permission must be assigned to the user associated with the API key? Any guidance or documentation would be greatly appreciated.

7 replies

Roxwell
Top Contributor ⭐
Forum|alt.badge.img+9
  • Top Contributor ⭐
  • August 15, 2025

It may not be the role it may be the key is incorrect, have you confirmed that the key works with other lower permission GET like seeing a ticket, to confim that’s right first. 

#MadeThatMistakeBefore


nickwu2016
Apprentice
Forum|alt.badge.img
  • Author
  • Apprentice
  • August 15, 2025

We checked these endpoints with the API key and they are working well:

  • /api/v2/agents/me
  • /api/v2/assets
  • /api/v2/tickets

So the API key should be valid?


  • Community Debut
  • August 15, 2025

I use an API key for a Service Account that has Account Admin and a custom FreshWorks Admin role.


nickwu2016
Apprentice
Forum|alt.badge.img
  • Author
  • Apprentice
  • August 15, 2025

Thanks! Do we have to use Admin role? Could I just assign some permissions as our IT refuses to assign an admin role to an account.


Roxwell
Top Contributor ⭐
Forum|alt.badge.img+9
  • Top Contributor ⭐
  • August 16, 2025

Its the admin role and “view agents”


Midhat
Community Debut
  • Community Debut
  • August 16, 2025

The request is to clarify permissions needed for the /api/v2/agents endpoint to access all users/agents' info via API. A 403 Forbidden error shows up despite valid API credentials.


Forum|alt.badge.img+6
  • Top Contributor ⭐
  • August 18, 2025

Thanks! Do we have to use Admin role? Could I just assign some permissions as our IT refuses to assign an admin role to an account.

You can view the permissions that an admin role gives and then create a new role that has the same permissions as that of admin role (just disable the account management and play god radio button as shown below) .

Also just ensure if the API key is enabled under agent profile > permissions