zkegs
(Zalman)
December 7, 2020, 10:24pm
1
Hi, So I tried a few post/get requests using JWT and it worked using Postman app, but when I tried using the same JWT token in a live app, it fails.
I also tried using oath 2.0 but I was not able to get passed step 2, getting the web token.
Any help would be appreciated. Thanks.
Hey @zkegs
Thanks for using the dev forum!
Have you tried to update o the latest version of Zoom, Zoom 1.8.3? This may be the problem.
Gabe
@PantherDeveloper
Hey @zkegs ,
Can you share a copy of the request/response you’re using so that we can help debug? If you’re able to get the request to work in Postman, please double check that you’re passing all of the same headers and authentication parameters in your code.
Thanks,
Will
1 Like
zkegs
(Zalman)
December 11, 2020, 5:04pm
4
Hi, Thanks for the help.
Request
api.zoom.us/v2/meetings/meeingid/registrants
header
Authorization: Bearer myjwtkeyhere
body
{“email”:“myemail”,“first_name”:“name”,“last_name”:“lastname”,“org”:“company”}
Response
{“responseText”:"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>
300</code>Unsupported Content Type</message></error>","
responseHeader":{“date”:“Fri, 11 Dec 2020 16:43:48 GMT”,“content-length”:“129”,
“server”:“ZOOM”,“expires”:“Thu, 01 Jan 1970 00:00:00 GMT”,“vary”:"
Access-Control-Request-Headers",“pragma”:“no-cache”,“set-cookie”:"_zm_chtaid="";
Domain=.zoom.us ; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/; Secure; HttpOnly"
,“x-content-type-options”:“nosniff”,“x-ratelimit-category”:“Light”,“content-type”:
“application/xml;charset=UTF-8”,“connection”:“keep-alive”,“x-zm-trackingid”
:“WEB_f811a…”,“cache-control”:“no-cache, no-store,
must-revalidate, no-transform”},“responseCode”:415}
MaxM
(Max M.)
December 11, 2020, 11:53pm
5
Hey @zkegs ,
Thank you for providing additional information. It looks like this is happening because you are using a Content-Type of application/xml
when this endpoint only supports JSON. In my requests, I typically don’t supply a Content-Type header and based on the JSON body that the server gets, it’s able to respond as expected. If the tool/server you are using to make the request is setting this header, I would override it with the value application/json
.
Let me know if you have any questions.
Thanks,
Max
zkegs
(Zalman)
December 14, 2020, 2:38pm
6
Yep, it works now. Thanks much for the help.
MaxM
(Max M.)
December 15, 2020, 8:24pm
7
Hey @zkegs ,
I’m glad to hear that resolved your issue! If you have any further issues or questions, please don’t hesitate to reach out.
Thanks,
Max
system
(system)
Closed
January 15, 2021, 6:25am
8
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.