Comments (4)
#71 I didn't really like how I handled retrieving the token from Zoom, so I used this as an opportunity to revamp things. I pushed a new version to PowerShell Gallery, dropping support for JWT while introducing a new cmdlet named Connect-PSZoom.
from pszoom.
So I didn't investigate a lot, but on first sight it seems, that a new function is needed. New-ZoomOAuthApiToken or something like that. Which replaces New-ZoomApiToken. Also New-ZoomHeaders needs some code change to support New-ZoomOAuthApiToken.
Are my assumptions correct?
I already managed to create a Server-to-Server OAuth app, request the token and list all users, without the PSZoom Module.
Trying now to figure out how to integrate it.
from pszoom.
from pszoom.
Here's what I've got. Currently no error handling of any kind.
function New-ZoomOAuthApiToken {
<#
.SYNOPSIS
Retrieves the Zoom OAuth API token
.DESCRIPTION
Retrieves the Zoom OAuth API token
.PARAMETER ClientID
Client ID of the Zoom App
.PARAMETER ClientSecret
Client Secret of the Zoom App
.PARAMETER AccountID
Account ID of the Zoom App
.OUTPUTS
Zoom API Response
.NOTES
Version: 1.0
Author: noaboa97
Creation Date: 20.07.2022
Purpose/Change: Initial function development
.EXAMPLE
$clientid = "YourClientID"
$clientsecret = "YourClientSecret"
$AccountID = "YourAccountID"
Get-XMCToken -ClientID $clientid -ClientSecret $clientsecret -AccountID $AccountID
.EXAMPLE
$token = Get-XMCToken -ClientID $clientid -ClientSecret $clientsecret -AccountID $AccountID
#>
[CmdletBinding()]
param (
[Parameter(valuefrompipeline = $true, mandatory = $true, HelpMessage = "Enter Zoom App Client ID:", Position = 0)]
[String]
$ClientID,
[Parameter(valuefrompipeline = $true, mandatory = $true, HelpMessage = "Enter Zoom App Client Secret:", Position = 1)]
[String]
$ClientSecret,
[Parameter(valuefrompipeline = $true, mandatory = $true, HelpMessage = "Enter Zoom App Account ID", Position = 2)]
[String]
$AccountID
)
$Uri = "https://zoom.us/oauth/token?grant_type=account_credentials&account_id={0}" -f $AccountID
#Encoding of the client data
$IDSecret = $ClientID + ":" + $ClientSecret
$EncodedIDSecret = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($IDSecret))
$headers = @{
"Authorization" = "Basic $EncodedIDSecret"
}
# Maybe add some error handling
$response = Invoke-WebRequest -uri $Uri -headers $headers -Method Post
return $response
}
Have a look if you have time, in the mean time I will check how I can integrate and keep you up to date.
from pszoom.
Related Issues (20)
- Download auto recorded calls for Zoom Phone.
- Adding POST commands HOT 2
- Remove-zoomspecificuserassistant doesn't allow you to remove assistant based on email address HOT 1
- Additional parameter for Remove-ZoomUser
- Get-ZoomMeetingsFromuser getting inaccurate times in object "duration". HOT 1
- Change Phone Userβs Extension Number HOT 1
- Get-ZoomUsers HOT 1
- Cannot bind argument to parameter 'InputObject' because it is null HOT 1
- new-zoomUser Error 400 bad request HOT 9
- Unable to connect with new PSZoom version HOT 9
- Get Sub Account Users HOT 5
- Restart-ZoomRoom 401 error HOT 2
- change the "user type" HOT 1
- Getting Unauthorized error when using Get-ZoomAccountRecordings HOT 1
- zoom call queues HOT 1
- Powershell Gallery is missing new Zoom Phone Functions
- ParticipantVideo parameter not supported by NewMeeting or UpdateMeeting HOT 1
- User accounts not getting created HOT 1
- "Cannot process argument transformation on parameter 'Token'" after updating to 2.0.4.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pszoom.