Participants invited as "Participants" still show up as cohost when using REST API

Status
Not open for further replies.

Kris G.

Silver Partner
Basic Certified
Joined
Jul 26, 2019
Messages
32
Reaction score
8
Looking for some feedback on my potential misuse of the API (given I can't achieve what I want, I assume it's possible). I've not played around with it much but so far I have found that using /adhoc (?extension={{extension}}&subject=API Test Meeting 4), for example:

JSON:
{
    "status": "success",
    "result": {
        "meetingid": "20332451051559bb8dj129928844136ed322285f166b0b5",
        "title": "API Test Meeting 4",
        "url": https://domain.tld/meet/33fe4d6ce55e8f588d0f48bfbcf1b56ac2f02fa00,
        "owner": "API User"
    },
    "errorInformation": ""
}

Then, add participants with /participants/meedingid/20332451051559bb8dj129928844136ed322285f166b0b5:

JSON:
[
{
  "name": "John Doe",
  "email": [email protected],
  "role": "Participant"
},
{
  "name": "John Doe",
  "email": [email protected],
  "role": "Participant"
}
]

Results in everyone being added as a cohost, not just the extension owner - they're not participants. Anyone else running into this, or see where I've gone wrong?

I'm running v18.0 Update 3 (Build 444).
 
Hi there, see the sample below. This is an ad-hoc meeting i created where i also inserted 4 "Participants" using the API request you mentioned above.

Ad-hoc meetings are meant to be quick to setup rooms with some predefined settings. One of these settings is the "selfModeration". This settings in fact makes everyone in the meeting a co-host by default regardless of their role. So by adding new users in the meeting, regardless of what role you try and set to them, they will always be co-hosts/moderators.

The better way to get what you want might be to create a scheduled meeting using the API and set "SelfModeration" to false and then add the users you want to as the scheduled meeting can be modified completely as you want.


Code:
{
    "status": "success",
    "result": {
        "meetingid": "20920301081050f7590bfghfgf579e44a99d345aaa51h607285",
        "type": "webmeeting",
        "openlink": "https://host.tld/meet/fghfgh",
        "pin": "741741",
        "dialIn": "1234",
        "hostJoinFirst": false,
        "selfModeration": true,
        "hideParticipants": false,
        "audioOnStart": true,
        "videoOnStart": true,
        "chatOnStart": true,
        "datetime": "2022-03-01T08:10",
        "duration": 30,
        "subject": "Test Meeting",
        "description": "",
        "organizer": {
            "name": "John Smith",
            "email": "[email protected]",
            "extension": "1000"
        },
        "participants": [
            {
                "name": "John Doe1",
                "email": "[email protected]",
                "join": "https://truncate.3cx.amsterdam:5001/meet/1234",
                "role": "Participant"
            },
            {
                "name": "John Doe2",
                "email": "[email protected]",
                "join": "https://truncate.3cx.amsterdam:5001/meet/2345",
                "role": "Participant"
            },
            {
                "name": "John Doe3",
                "email": "[email protected]",
                "join": "https://truncate.3cx.amsterdam:5001/meet/3456",
                "role": "Participant"
            },
            {
                "name": "John Doe4",
                "email": "[email protected]",
                "join": "https://truncate.3cx.amsterdam:5001/meet/4567",
                "role": "Participant"
            }
        ]
    },
    "errorInformation": ""
 
Last edited by a moderator:
  • Like
Reactions: StefanW
Hmm, I am not seeing the JSON response you are (if that is in fact all in one reply).

Submitted:

JSON:
{
    "hostJoinFirst": true,
    "hideParticipants": false,
    "selfModeration": false,
    "audioOnStart": true,
    "videoOnStart": true,
    "chatOnStart": true,
    "dateTime": "2022-09-27T19:30:00Z",
    "duration": 30,
    "subject": "3CX Video Conferencing",
    "description": "Meeting Description",
    "extension": "{{extension}}",
    "type": "Webinar",
    "participants": [
        {
            "name": "Guest 1",
            "email": "[email protected]",
            "role": "Participant"
        },
        {
            "name": "Guest 2",
            "email": "[email protected]",
            "role": "Participant"
        }
    ]
}

Received JSON reply:

JSON:
{
    "status": "success",
    "result": {
        "meetingid": "meetingid",
        "participants": [
            {
                "name": "Guest 1",
                "email": "[email protected]",
                "join": "https://3cxhost/meet/stuff1",
                "role": "Participant"
            },
            {
                "name": "Guest 2",
                "email": "[email protected]",
                "join": "https://3cxhost/meet/stuff2",
                "role": "Participant"
            }
        ]
    },
    "errorInformation": ""
}

The reason I was using Adhoc is that seemed to be the only way I could reliably ascertain the host URL to start the meeting via the API rather than rely on an email sent to whatever email is in the extension that is hosting.
 
Status
Not open for further replies.

Forum statistics

Threads
111,973
Messages
590,077
Members
164,896
Latest member
sameage