Invoke-RestMethod: “POST” end in unclear error message
Description
I am executing the following commands:
$headers = New-Object “System.Collections.Generic.Dictionary[[String],[String]]”
$headers.Add(‘Content-Type’ , $contentType)
$headers.Add(‘Authorization’,'Bearer ’ + $token)
$base_uri = “https://api.zoom.us/v2”
$phoneID=$phone_site_detail.id
$body = @{
“description” = “Testtemplate for phone users”
“name” = “Phone User Template”
“site_id” = $phoneID
“type” = “user”
} | ConvertTo-Json
Invoke-RestMethod -uri $base_uri+"/phone/setting_templates" -Method POST -Body $body -Headers $headers -ContentType “application/json”
As a result I am receiving the following (not real) Error / Information message
Invoke-RestMethod:
window.zmGlobalMrktId = “5fda3c08cc144b719072d9**********” || null;
window.zmGlobalMrktKey = “” || null;
Page Not Found - Zoom
var resourceAccountIdRoutingURl = “”;
resourceAccountIdRoutingURl = resourceAccountIdRoutingURl==""?undefined:resourceAccountIdRoutingURl;
var _market_OneTrust_CookieArray = ;
_market_OneTrust_CookieArray.push({name: “_zm_tracking_guid”, value: “a644c1cce40a4445a5f8668b6bbe0c4e”});
var _zm_cookie_domain = “.zoom.us”;
body div.combobox div.dropdownlist{
width: calc(100% + 2px) !important;
}
And the output in general is much longer than i have space here, but these are the first and seems to be the most important ones.
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
Which Endpoint/s?
https://api.zoom.us/v2/phone/setting_templates
How To Reproduce (If applicable)
Steps to reproduce the behavior:
- Invoke-RestMethod -uri $base_uri+"/phone/setting_templates" -Method POST -Body $body -Headers $headers -ContentType “application/json”
- window.zmGlobalMrktKey = “” || null;
Additional context
$token, $phone_site_detail.id and the access via JWT in general is working, because I am getting all expected information with the RestAPI GET Method.
Does anyone has some ideas, what i am doing wrong here?