Thanks in advance for any help! First, I am making use of the new FreshWorks feature (currently supported by FreshService-only) to implement the OAuth flow to connect inbound into the FreshService rest API instead of using basic auth/API key to connect to the FreshService API.
For context, the following link covers how to create an OAuth inbound connection, though it’s a bit confusing since it is using FreshWorks on both ends of the OAuth connection described. Freshworks Developer Docs | Implement OAuth authorization flow in external apps (that access Freshworks resources) The aspect I’ve implemented is the INBOUND connection where an external party is making an INBOUND connection into FreshService using OAuth (to be clear, this has nothing to do with marketplace apps, etc).
This link discusses how to create the OAuth credentials inside FreshWorks - this provides the clientid/secret that I am using to connect: Freshworks Developer Docs | Use request method + OAuth to access Freshworks resources
After successfully creating the OAuth credential (including picking a variety of OAuth scopes for the connection) and then connecting to the FreshService API using the OAuth credential as described above, I have then successfully used this OAuth connection to pull data from the published FreshService rest endpoints including /api/v2/tickets, /api/v2/agents, including /api/v2/roles .
Some additional information:
I’ve been able to access a FreshService API endpoint that provides information about the logged-in user via basic auth, which until recently, was the only way to connect to the FreshService rest API - this endpoint is /api/v2/agents/me . This endpoint returns a json response that contains the user profile. Note that this endpoint seems to have been left of the FreshService documentation, but it does in fact work - for incoming connections that use Basic Auth. This endpoint HAS been documented for FreshDesk, but seems to have been left off the documentation for FreshService.
MY QUESTION/PROBLEM:
I’d like to access the /api/v2/agents/me endpoint with the OAuth connection I’ve described above in the same way that I was able to access that endpoint using basic auth.
When I connect to FreshService using OAuth and then attempt to call the the /api/v2/agents/me endpoint, I get the following response:
{
"code": "access_denied"
"message": "You are not authorized to perform this action."
}
This message sounds to me like I don’t have the right scope to access the /api/v2/agents/me endpoint, but my OAuth connection has the freshservice.agents.manage scope, which grants me access to the /api/v2/agents endpoint, and I would assume, any endpoints underneath that endpoint. However, as shown by the response I received and copied above, that doesn’t seem to be the case.
My question:
- Is there some additional existing scope that I need to select in order to access the /api/v2/agents/me endpoint, and if so, what is it?
- Alternatively, does Freshworks need to add a new scope to allow for access to the /api/v2/agents/me endpoint?
- If neither of those is the case, is the /api/v2/agents/me just flat-out UNsupported for inbound OAuth connections to the rest API, even though it IS supported for Basic Auth connections? If this is the case, are there plans to implement this endpoint for incoming OAuth connections?
Thanks again for your help.