Closed vonKingsley closed 1 year ago
Hi @vonKingsley Thanks for reaching out. In the code snippet shared , it seems the api you are using expects the Interaction Channel resource
in sid instead of Interaction Channel Participant resource
which you are passing currently. It seems like the doc for snippets needs to be updated as well. However if you ru the command
twilio api:flex:v1:interactions:channels:participants:update --help
you can verify that the api expects Interaction Channel resource
in sid
. Same is mentioned here in the doc
Thanks @kridai . I believe the docs may be incorrect on that as well as the --help flag. The --help flag states 4 required flags
REQUIRED FLAGS
--channel-sid=<value> The Channel Sid for this Participant.
--interaction-sid=<value> The Interaction Sid for this channel.
--sid=<value> The unique string created by Twilio to identify an Interaction Channel resource.
--status=<value> The Participant's status. Can be: `closed` or `wrapup`. Participant must be an agent.
Since we are updating the Interactions Channel Participant endpoint, I'm not sure why the main --sid would use the Interactions Channel resource, and not the Interactions Channel Participant resource? I believe it should be the following
--channel-sid, This should be the Interaction Channel Resource --UO
--interaction-sid, for the Flex interaction --KD
--sid, This should be the Interactions Channel Participant resource --UT
Also I want to mention that using python or node libraries this is actually the correct way to call this API endpoint with a sid that starts with UT
channel = twilio.fetch_interaction("KD{32}").channels("UO{32}")
print('hey', channel.participants.list())
-> [<Twilio.FlexApi.V1.InteractionChannelParticipantInstance interaction_sid=KD{32} channel_sid=UO{32} sid=**UT**{32}>, <Twilio.FlexApi.V1.InteractionChannelParticipantInstance interaction_sid=KD{32} channel_sid=UO{32} sid=**UT**{32}>]
channel.participants("**UT**{32}").update(status="closed")
Hi @vonKingsley , In order to properly debug this issue, please file a support ticket.
As a temporary workaround, you can pass the --skip-parameter-validation flag:
--skip-parameter-validation Skips client-side parameter validation. Useful for debugging when twilio-cli is being overly-aggressive in validating parameter values.
Applies to the `twilio login`, `twilio profiles:add`, and all `twilio api` sub-commands.
Issue Summary
When updating a participant on a Flex Interaction the following error is returned
Steps to Reproduce
Code Snippet
Exception/Log
Technical details:
twilio-cli/5.3.3 darwin-x64 node-v16.19.0
Issue can be fixed by changing the pattern here to start with UT
The documentation here shows that the sid for a participant update should have a sid that starts with UT.