My question is 2 part question all centered around the overlying question: What API calls should I be using since the IM - Group API is no longer viable.
Goal: User Powershell → Invoke-Restmethod to communicate Zoom Groups API to: Add/Remove/move users throughout Groups. This will be done by using the generated code given to me from PostMan, which has the Zoom API library imported
Prerequisite: I removed and re-added the Zoom API library to Postman hoping I just had an outdate version. It did not help
Problem 1: The following code was generated by postman to use the API path: /groups/{group Id}/members → POST Add group members
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "multipart/form-data")
$headers.Add("Accept", "application/json")
$multipartContent = [System.Net.Http.MultipartFormDataContent]::new()
$stringHeader = [System.Net.Http.Headers.ContentDispositionHeaderValue]::new("form-data")
$stringHeader.Name = "members"
$stringContent = [System.Net.Http.StringContent]::new("[{`"id`":`"someID`",`"email`":`"employeeX@nelsonjameson.com`"}]")
$stringContent.Headers.ContentDisposition = $stringHeader
$multipartContent.Add($stringContent)
$body = $multipartContent
$response = Invoke-RestMethod 'https://api.zoom.us/v2/groups/velit aliqua irure deserunt cupidatat/members?access_token=myToken' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
When run with the latest version of powershell 7 I get the error:
Invoke-RestMethod:
Line |
14 | $response = Invoke-RestMethod 'https://api.zoom.us/v2/groups/velit al …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| {"code":300,"message":"Unsupported Content Type"}
Why would this be happening?
Problem 2: The API path /groups/{groupId}/members/{memberId} → PATCH Update a group member
IS NOT present in Postman > Zoom API methods.
Do I just have the wrong version of the Zoom API libraries imported into my Postman? I couldn’t seem to find recent up-to-date documentation for getting the latest definitions into Postman.
More to that point, am I using the correct calls/libraries to replace my: IM → Groups calls?
Any help appreciated, you need more info let me know.