# Invoke Rest returning {"code":2300,"message":"This API endpoint is not recognized."}

**URL:** <https://devforum.zoom.us/t/invoke-rest-returning-code-2300-message-this-api-endpoint-is-not-recognized/100903>\
**Category:** Chat\
**Created:** [December 28, 2023, 8:25pm UTC](https://devforum.zoom.us/t/invoke-rest-returning-code-2300-message-this-api-endpoint-is-not-recognized/100903 "2023-12-28T20:25:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.miller2](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@michael.miller2](https://devforum.zoom.us/u/michael.miller2)\
**Post date:** [December 28, 2023, 8:25pm UTC](https://devforum.zoom.us/t/invoke-rest-returning-code-2300-message-this-api-endpoint-is-not-recognized/100903/1 "2023-12-28T20:25:50Z")

</div>

### Format Your New Topic as Follows:

**API Endpoint(s) and/or Zoom API Event(s)**  
_Link the API endpoint(s) and/orZoom API Event(s) you’re working with to help give context._

[https://api.zoom.us/v2/chat/users/userID/channels](https://api.zoom.us/v2/chat/users/userID/channels)

> **[Zoom Team Chat API](https://developers.zoom.us/docs/api/rest/reference/chat/methods/#operation/createChannel)**
>
> API Reference for /docs/api/rest/reference/chat/methods

**Description**  
I am trying to build a powershell script to add team chat channels using this endpoint:  
[https://api.zoom.us/v2/chat/users/userID/channels](https://api.zoom.us/v2/chat/users/userID/channels).

I’ve replaced userID with my unique userID I got by calling [https://api.zoom.us/v2/users/email@user.com?login\_type=101&encrypted\_email=false&search\_by\_unique\_id=false](https://api.zoom.us/v2/users/email@user.com?login_type=101&encrypted_email=false&search_by_unique_id=false) with my zoom account email address.

When I try to use the userID I get the error in the title. I’ve tried using the “me” endpoint and that isn’t working either.

I’ve tried calling other apis without issue, I can do a GET for my user information and for the list of channels but cannot create a new channel.

My Oauth app is active and I have the listed scopes in the API guide applied. My authentication token seems to be good since I can call other endpoints.

Does anyone have any other suggestions to try?

Thank you,  
Mike

---

<div class="post-metadata">

**Author:** ![michael.miller2](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@michael.miller2](https://devforum.zoom.us/u/michael.miller2)\
**Post date:** [December 28, 2023, 9:04pm UTC](https://devforum.zoom.us/t/invoke-rest-returning-code-2300-message-this-api-endpoint-is-not-recognized/100903/2 "2023-12-28T21:04:09Z")

</div>

If it helps anyone, I found that my issue was that I didn’t specify that the API call was a json application call

Invoke-RestMethod ‘[https://api.zoom.us/v2/chat/users/{userID}/channels](https://api.zoom.us/v2/chat/users/%7BuserID%7D/channels)’ -Method ‘POST’ -Headers @{Authorization = “Bearer $token”} -Body $body -ContentType ‘application/json’

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 28, 2023, 10:42pm UTC](https://devforum.zoom.us/t/invoke-rest-returning-code-2300-message-this-api-endpoint-is-not-recognized/100903/3 "2023-12-28T22:42:18Z")

</div>

Thanks for sharing how you resolved @michael.miller2 !
