I've encountered a problem with getting agent data via Freshservice API.
I'm making a GET request at '/agents/${id}’ to accuire an agent user data information, but in response I'm getting 404 Not Found Error.
I use requester Id that is present with the creation of a ticket. I should note, that when the requester is not a Freshservice agent I can get their data just fine.
How can I fix this problem, or is it a known problem? If so, when I can hope it will be fixed?
Best answer by zachary.king
Hello @alina.abdurshina, In the API endpoint that you are hitting it requires the numerical ID of an agent that is present in your instance of freshservice, you must also have a valid API key to make this request. I am sure you are aware of all of that, but in your question you mention that you are using the “Requester” id from the creation of a ticket. The “Requester” ID and the “Agent” ID are not the same. You will want to make sure that you are using the correct ID when making your request to https://yourdomain.freshservice.com/api/v2/agents/[agent-id].
Hello @alina.abdurshina, In the API endpoint that you are hitting it requires the numerical ID of an agent that is present in your instance of freshservice, you must also have a valid API key to make this request. I am sure you are aware of all of that, but in your question you mention that you are using the “Requester” id from the creation of a ticket. The “Requester” ID and the “Agent” ID are not the same. You will want to make sure that you are using the correct ID when making your request to https://yourdomain.freshservice.com/api/v2/agents/[agent-id].