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

**URL:** <https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615>\
**Category:** API and Webhooks\
**Created:** [December 17, 2020, 7:52am UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615 "2020-12-17T07:52:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![maged.ahmedr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maged.ahmedr/32/20269_2.png) [@maged.ahmedr](https://devforum.zoom.us/u/maged.ahmedr)\
**Post date:** [December 17, 2020, 7:52am UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/1 "2020-12-17T07:52:43Z")

</div>

**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](mailto: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.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 17, 2020, 6:35pm UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/2 "2020-12-17T18:35:17Z")

</div>

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](https://marketplace.zoom.us/docs/api-reference/zoom-api/chat-channels-account-level/invitechannelmembers).

Let me know—thanks!  
Will

---

<div class="post-metadata">

**Author:** ![maged.ahmedr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maged.ahmedr/32/20269_2.png) [@maged.ahmedr](https://devforum.zoom.us/u/maged.ahmedr)\
**Post date:** [December 17, 2020, 11:38pm UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/3 "2020-12-17T23:38:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 18, 2020, 6:07pm UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/4 "2020-12-18T18:07:41Z")

</div>

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:

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

```

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![maged.ahmedr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maged.ahmedr/32/20269_2.png) [@maged.ahmedr](https://devforum.zoom.us/u/maged.ahmedr)\
**Post date:** [December 18, 2020, 7:30pm UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/5 "2020-12-18T19:30:16Z")

</div>

Thanks for trying to help

Full Request URL:  
[https://api.zoom.us/v2/chat/users/{userId}/channels/{channelId}/members](https://api.zoom.us/v2/chat/users/%7BuserId%7D/channels/%7BchannelId%7D/members)

Full request body

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

```

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

```auto

hope this helps identify the problem
```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [December 18, 2020, 9:57pm UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/6 "2020-12-18T21:57:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![maged.ahmedr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maged.ahmedr/32/20269_2.png) [@maged.ahmedr](https://devforum.zoom.us/u/maged.ahmedr)\
**Post date:** [December 19, 2020, 6:50am UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/7 "2020-12-19T06:50:44Z")

</div>

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 .

---

<div class="post-metadata">

**Author:** ![maged.ahmedr](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maged.ahmedr/32/20269_2.png) [@maged.ahmedr](https://devforum.zoom.us/u/maged.ahmedr)\
**Post date:** [December 19, 2020, 6:58am UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/8 "2020-12-19T06:58:23Z")

</div>

Here is my implementation in laravel

```auto
$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`

```auto
[
    {
        "email": ""
    }
]

```

this result to have request like this

```auto
{
  "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

```auto
{
    "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 .

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [December 21, 2020, 10:37pm UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/9 "2020-12-21T22:37:56Z")

</div>

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](https://zoom.us/account/user#/) or the [Create User API](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/usercreate). 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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [January 21, 2021, 8:38am UTC](https://devforum.zoom.us/t/inviting-members-always-return-message-invalid-parameter-members/38615/10 "2021-01-21T08:38:12Z")

</div>

Closed on January 21, 2021, 8:38am UTC

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