Legacy Dev Forum Posts

 View Only

Sign Up

userId member not in CallMediaParticipant.java

  • 1.  userId member not in CallMediaParticipant.java

    Posted 06-05-2025 18:31

    NicolasP | 2024-07-29 13:26:16 UTC | #1

    Hello,

    When calling the API GET/api/v2/conversations, we can see the agent participant (purpose="agent") has a field called userId. But when desirializing, the Java SDK uses CallMediaParticipant ( https://github.com/MyPureCloud/platform-client-sdk-java/blob/master/build/src/main/java/com/mypurecloud/sdk/v2/model/CallMediaParticipant.java) and it does not have a userId member: it is normal because participants have specific fields (agents/customer/acd etc.) ? How can I access those “specific” values ?

    Thanks.


    Jerome.Saint-Marc | 2024-07-29 14:07:55 UTC | #2

    Hello,

    It is not the right class to use to deserialize. "GET/api/v2/conversations" returns a ConversationEntityListing (with Conversation in it). In the Conversation class, the participants are instances of the "Participant" class.

    The CallMediaParticipant class is related to another endpoint - "GET/api/v2/conversations/calls". This endpoint returns a CallConversationEntityListing (with CallConversation in it). In the CallConversation class, the participants are instances of the "CallMediaParticipant" class.

    Regards,


    NicolasP | 2024-07-29 18:39:13 UTC | #3

    Hello Jerome,

    You are right, thank you for the precision ! I was mixing both calls (GET/api/v2/conversations vs GET/api/v2/conversations/calls.) Thanks again for your help.

    Nicolas


    system | 2024-08-29 18:39:33 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 27452