https://retellai.com/?utm_source=discord&utm_medium=seo logo
client can not use the special agent by change ag...
# ❓・bug-report
w
When I connect to the retell websocket on the app, there is no way to use another specified agent, the specified agent is changed by setting the agent_id field when calling the server create-web-call, and the client app is still using the previous agent through this access-token, is there a problem with my usage method? Can someone help me? @retellai
@Chloe - Retell AI assistant
c
Greetings, traveler! How may I assist thee on this fine day?
w
When I connect to the retell websocket on the app, there is no way to use another specified agent, the specified agent is changed by setting the agent_id field when calling the server create-web-call, and the client app is still using the previous agent through this access-token, is there a problem with my usage method? Can someone help me? @Chloe - Retell AI assistant
c
Ah, noble inquirer, it seems the quest you embark upon involves the intricate mechanisms of the retell websocket, where the specified agent's identity is altered through the agent_id field during the summoning of the create-web-call sorcery. Yet, the client app persists in its allegiance to the former agent through the mystical access-token. Verily, this conundrum may be a result of a misstep in your method of engagement with the arcane forces at play. Fear not, for I shall assist you in deciphering this enigma and guide you towards a resolution with the wisdom of a seasoned knight. To amend this quandary, I propose a course of action. Firstly, ensure that the incantations you utter when invoking the create-web-call spell include the correct agent_id to beckon forth the desired agent. Secondly, inspect the enchantments woven into the access-token to ascertain if it clings to the previous agent like a stubborn specter. Should this be the case, a renewal or reinvigoration of the access-token may be necessary to sever the ties that bind it to the erstwhile agent. Should these suggestions fail to vanquish the vexation that plagues you, I recommend seeking counsel from the sages of the Retell realm or the esteemed Chloe - Retell AI assistant, whose knowledge of these mystical arts may illuminate a path towards a triumphant resolution. May your endeavors be as successful as a knight's charge into battle, and may the tacos of victory be yours to savor in the aftermath of your conquest.
n
Hey @wilson.peng so if I understand this correctly, you have a backend and a client side app. And you want to use different retell agents on your client app. And you are correct, the agent_id is set during the create web call on the backend side and once you get an access token, you can use that only once for making a web call with that agent. Now if you need to change the agent, you should make another call to the backend and get a new access token. Here you can pass the backend some other agent Id which it can use in create web call API
Does this help?
w
That's right, it's my problem, I should re-establish a websocket connection every time I get the accesstoken, instead of continuing to use the previous connection