Last active
June 7, 2023 19:23
-
-
Save nrctkno/50bfcb98d26d42a709019bcb5290e62a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<php | |
//uses Zumba Core HTTP as facade | |
function getToken(): string | |
{ | |
$zoomAccountId = ''; | |
$zoomClientId = ''; | |
$zoomClientSecret = ''; | |
$zoomOAuthUrl = 'https://zoom.us/oauth/token'; //note that this is not the same URL as the one for the API | |
$request = new Http($zoomOAuthUrl); | |
$request->headers([ | |
'Authorization: Basic ' . base64_encode("$zoomClientId:$zoomClientSecret"), | |
]); | |
return $request->request('POST', [ | |
'grant_type' => 'account_credentials', | |
'account_id' => $zoomAccountId | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment