11-01-2020 07:18 AM - edited 11-02-2020 04:04 AM
Hi,
I'm trying to perform an API command on an Agent using Supervisor credentials.
Using the AgentRealTime, AgentTeam, and join tables, I find the Agent and the Team Supervisor, then invoke the API against the agent's ID using the Supervisor's login credentials.
I have debugged my joins and it is certain that the supervisor ID is correct for the team to which the agent belongs. The team has 5 supervisors - I'm not sure I need to be concerned which is the primary supervisor, I just use the Finesse login id of the supervisor performing the action and verify the relationship using the AW tables.
Does the API command have to be performed by the Primary supervisor of a team, or can any of the supervisors perform API commands?
Here is the error I'm getting:
<ApiErrors> <ApiError> <ErrorType>User does not belong to Supervisor's Teams</ErrorType> <ErrorData>20132</ErrorData> <ErrorMessage>The user does not belong to a Team monitored by the Supervisor specified in the authentication credentials</ErrorMessage> </ApiError> </ApiErrors>
https://finesse.company.com/finesse/api/User/20132/Media/5050 <Media><routable>false</routable></Media>
Solved! Go to Solution.
11-02-2020 08:29 AM - edited 11-02-2020 02:27 PM
Turns out that I was using Agent.SkillTargetID instead of Agent.PeripheralNumber for the {id} portion of the API's URL. Sorry for the bother. A simple query change and it all just works! The reason it worked with different authorization was a fluke - the SkillTargetID matches another agent's PeripheralNumber!
11-02-2020 01:14 AM
I do not know what the issue is - but you will not need to be a Primary Supervisor.
As long as the Supervisor is a supervisor of the team - that should be sufficient to have supervisor access.
Gerry
11-02-2020 08:29 AM - edited 11-02-2020 02:27 PM
Turns out that I was using Agent.SkillTargetID instead of Agent.PeripheralNumber for the {id} portion of the API's URL. Sorry for the bother. A simple query change and it all just works! The reason it worked with different authorization was a fluke - the SkillTargetID matches another agent's PeripheralNumber!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide