Inviting members always return "message": "Invalid parameter: members."

Description
When i try to invite members to a channel i provide members to the request like this
‘members’ => $request->members
i debugged $request->members and it return
[
{
“email”: “somemail@gmail.com
}
]

but when i hit the endpoint i get
“message”: “Invalid parameter: members.”
i tried everything nothing seems to be working !

Error
The full error message or issue you are running into.
code:400
“message”: “Invalid parameter: members.”

Which App Type (OAuth / Chatbot / JWT / Webhook)?
Knowing the endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.
Oauth

Which Endpoint/s?
Knowing the API endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

/chat/users/{userId}/channels/{channelId}/members

How To Reproduce (If applicable)
Steps to reproduce the behavior:

  1. Request URL / Headers (without credentials) / Body
  2. See error

Screenshots (If applicable)
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Hi @maged.ahmedr,

Thanks for reaching out about this. Happy to help.

To confirm, are you passing a valid email of someone who is in your contact list? This is a requirement for inviting someone to a channel using this endpoint.

Let me know—thanks!
Will

Yes it’s in my contact list i made sure of that

Hi @maged.ahmedr,

Thanks for confirming. Can you please share the full request URL you’re using? Additionally, please ensure that you’re passing the full request body, including the members object—the request body you shared looks like it might not be including this:

{
  "members": [
    {
      "email": "rtxbZkoL6ZVr@BKRUfQISqmtCCeuGPP.ma"
    }
  ]
}

Thanks,
Will

Thanks for trying to help

Full Request URL:
https://api.zoom.us/v2/chat/users/{userId}/channels/{channelId}/members

Full request body

{
  "members": [
    {
      "email": "omnia1699@gmail.com"
    }
  ]
}

response status code : 300
response message “Invalid parameter: members.”


hope this helps identify the problem

Hey @maged.ahmedr,

Thank you for providing additional information. After looking at the user under that email, I’m seeing that it is a Free user with no other users on the account. What account are you making this request from? It’s important to note that if a user is not under your account, you will not be able to add them to a channel either with this API or through the UI.

I hope that helps! Let me know if you have any questions.

Thanks,
Max

What do you mean by "Under your account ? " i added this contact to contacts using mobile app and now it’s labeled “External” besides this contact, i also tried creating public channel to invite the user and got same message even though i can add the contact to channel using UI with no issues .

Here is my implementation in laravel

$path = "https://api.zoom.us/v2/chat/users/" . $userId . "/channels/" . $channelId ."/members";

$response = Http::post($path, ['members' => $request->members]);

here’s channel id:
type: public channel
my user id:

here is $request->members

[
    {
        "email": ""
    }
]

this result to have request like this

{
  "members": [
    {
      "email": ""
    }
  ]
}

i even tried to change the way i send data to this way
$response = Http::post($path, [$request->all()]);

as $request->all() return

{
    "members": [
        {
            "email": "omnia1699@gmail.com"
        }
    ]
}

but this cause status 400 with no extra data ( was just trying )
i found on mobile app a button to enable inviting contacts, i enabled it then tried the api still return same message. again -> i can invite same contact using mobile app .

Hey @maged.ahmedr,

Thank you for providing additional information. When I refer to the user being under your account, I mean that they should be internal to your Zoom account. This means that they are created through the User Management Zoom portal or the Create User API. It’s also possible to invite an existing Zoom user to your account and transfer their user to your account.

Are you also able to provide information on where you’re obtaining the Channel ID? In most cases, Channel IDs don’t have hyphens in them.

I hope that helps! Let me know if you have any questions.

Thanks,
Max

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