Don
(Donald)
January 13, 2020, 11:03pm
1
I need to get a new access token and a refresh token using OAuth via cURL. I have worked with Jakob at Zoom support and he helped me set it up in Postman 2. When I copy that into a cURL statement from my software (FileMaker Pro cURL function), I do not get back both tokens.
Instead, I get this error: {“reason”:“Invalid client_id or client_secret”,“error”:“invalid_client”}
The cURL request I copied from Postman looks like this:
xcurl --location --request POST ‘https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token=REFRESH_TOKEN ’
–header ‘Authorization: Basic key:secret’
–header ‘Authorization: Bearer ACCESS_TOKEN’
The Endpoints and command are in the cURL statement above, and the token info has been truncated along with the auth info.
To run this in FileMaker, I have to enclose the entire string above in double quotes, but all that does is render what is between the quotes, which matches the info above.
I have verified the refresh token and the access token strings, but no luck.
Any help is really appreciated.
tommy
(Tommy Gaessler)
January 14, 2020, 5:44pm
2
Hey @Don ,
It appears you are setting both Basic, and Bearer authentication in this CURL request.
To make things easier, have you considered using a JWT Token instead of OAuth? You can call our APIs immediately via:
curl --request GET \
--url 'https://api.zoom.us/v2/users' \
--header 'authorization: Bearer JWT_TOKEN_HERE'
When using CURL, I recommend using JWT.
Thanks,
Tommy
Don
(Donald)
January 14, 2020, 11:15pm
3
Thanks, Tommy. JWT doesn’t work to download Zoom recording links. An Oauth Access token is required for that function.
Don
tommy
(Tommy Gaessler)
January 14, 2020, 11:21pm
4
Hey @Don ,
JWT Tokens should work to download recording links. Try adding this query param to the end of the download_url
:
?access_token=JWT_TOKEN_HERE
Thanks,
Tommy
Don
(Donald)
January 14, 2020, 11:34pm
5
Will do. Support was my indicated that an Oauth token was needed. I’ll give it a try.
Thank you.
tommy
(Tommy Gaessler)
January 15, 2020, 12:19am
6
Give it a try and let me know if you run into any trouble!
Thanks,
Tommy
Don
(Donald)
January 15, 2020, 2:05am
7
I am able to grab the download link, but I when I try to open it (even on the browser where I am logged in to Zoom) I get this error message:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Jan 15 02:01:43 GMT 2020
There was an unexpected error (type=Not Acceptable, status=406).
Could not find acceptable representation
tommy
(Tommy Gaessler)
January 15, 2020, 4:53pm
8
Hey @Don ,
Can you please share the download link you are using so I can debug?
Thanks,
Tommy
Don
(Donald)
January 16, 2020, 2:15am
9
Sure thing, Tommy: https://zoom.us/v2/phone/recording/download/5DV6Zj-FRUucKBNMCKnKfw
This is the cURL request I sent:
“curl --location --request GET
–header ‘Authorization: Bearer JWT’”
Thanks for all you help. I really appreciate it.
tommy
(Tommy Gaessler)
January 16, 2020, 5:30pm
10
Hey @Don ,
I was able to download the recording via this url:
https://zoom.us/v2/phone/recording/download/5DV6Zj-FRUucKBNMCKnKfw?access_token=JWT_TOKEN_HERE
Please try pasting that url replacing JWT_TOKEN_HERE
with your JWT Token and see if it downloads the recording.
Thanks,
Tommy
Don
(Donald)
January 20, 2020, 2:59pm
11
Sorry for the delayed response, Tommy. Your idea worked perfectly! I am able to download the files now and listen to them.
Thanks so much for your help.
1 Like
tommy
(Tommy Gaessler)
January 21, 2020, 4:47pm
12
Glad to hear it is working!
You are welcome!
Thanks,
Tommy