-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download recording files, easily? #82
Comments
The Zoom package utilises the Laravel HTTP client under the hood, which in turn uses the Guzzle HTTP Client. As you are attaching the token to the URL you don't need to use the Zoom Entry Point, you can just use the Http Client direct. So first you would need to build a JWT token $jwtToken = \MacsiDigital\API\Support\Authentication\JWT::generateToken(['iss' => config('zoom.api_key'), 'exp' => time() + config('zoom.token_life')], config('zoom.api_secret')); Then you can build the HTTP Client $client = \MacsiDigital\Zoom\Support\Client::withToken($jwtToken); Form there you can then use any of the Laravel HTTP methods which are listed in the link below |
it seems
Using the Http client directly with |
Apologies it should have been \Illuminate\Support\Facades\Http and not \MacsiDigital\Zoom\Support\Client You need to hook into Laravels HTTP Client Here is the documentation for the withToken method, however if you are passing the token in the URL, I am not 100% that setting the token is necessary, so you would need to experiment for your use case. |
You're right about the withToken thing for downloads, downloads pass it as a URL parameter. I did end up using withToken for getting recordings since I still haven't gotten the with/to functionality to work as it's supposed to (#67). |
I can borrow the JWT functionality (slightly modified copy paste from
src/Support/Entry.php
) to get a new token and append it to the URL with parameteraccess_token
in order to download the files with curl, but this is a bit ugly.Is there a way to get the current active JWT token that laravel-zoom is itself using already, or better yet could we get added functionality for downloading files to make it a simple function call instead of doing all the curl ourselves? This is my first time using Laravel so there may be a really obvious solution that I just don't see (I don't even understand how the JWT calls work normally, since I didn't see where newRequest even gets called to get a JWT token to begin with ... )
Example code that works to show how I'm achieving this now (this is ugly test code just to figure out how to do it, after using some other ugly test code to find a download url for one of the recording files)
The text was updated successfully, but these errors were encountered: