Description
Hi all,
When I try and run the POST /meetings/meetingId/registrants endpoint in a POSTMAN Collection, I receive a 401 unauthorized error. However when I run this POST request by itself, it runs fine. Any thoughts? This is an OAuth app.
Description
Hi all,
When I try and run the POST /meetings/meetingId/registrants endpoint in a POSTMAN Collection, I receive a 401 unauthorized error. However when I run this POST request by itself, it runs fine. Any thoughts? This is an OAuth app.
Hi @kannan1,
Happy to look into this for youâcan you share an example of the request in Postman (or a screenshot)? Please include request URL and headers sections, as well as the response. This will help me to debug.
Thanks!
-Will
Hi @will.zoom,
I would be happy to share an example of the request in Postman.
POST {{baseUrl}}/meetings/meetingsid/registrants
Authorization: Bearer
Cookie:
Cache-Control:
Postman-Token
Content-Type = application/json
Content-Length
Host
User-Agent: PostmanRuntime/7.26.5
Accept-Encoding: gzip, deflate, br
Connection: Keep-alive
I have removed the bear token for security reasons. I also read up in the documentation that in order to send a collection in POSTMAN you need to use a JWT token. I also donât get a response when I send the collection. However here is the response when I send it by itself:
{
âregistrant_idâ: âL84f9XCtTMiZWyA9aBsWqwâ,
âidâ: "ID Number,
âtopicâ: âTestâ,
âstart_timeâ: â2020-11-30T19:00:00Zâ,
âjoin_urlâ: âZoom URLâ
}
Hey @kannan1,
Although I canât see the request body youâre passing, here is an example of how you should be sending this request in Postman:
Request URL/Body
Request Headers
Authorization
And in response, you should get something like this:
Let me know if this helps!
Best,
Will
Hi @will.zoom, thanks for following up. Will this work if I run it in a collection? That is where I get the 401 error.
I can run it fine by itself though.
Hey @kannan1,
If these details are the same, it should run in a collection as well. Can you double check your collection variables are set correctly as well? (i.e., baseUrl contains âhttpsâ, etc.)
Let me know!
Will
Hey @will.zoom the details are the same and the variables look to be set correctly. Do I need to set up the variables in the collection itself?
Hey @kannan1,
YesâIf youâre using a collection, I would ensure that collectionâs global variables are set correctly as well.
Thanks,
Will
Hey @will.zoom so I added my variables to the collection global variables and I am still getting a 401. Any thoughts?
Hey @kannan1,
Can you share a screenshot of the exact request/response in Postman thatâs returning the 401?
Thanks,
Will
Hey @will.zoom here is what the response looks like in the collection runner:
And here is what the collection looks like:
Hey @kannan1,
Can you try adding an initial value for your variables (even if theyâre the same) and see if that helps? If you still have trouble, I might recommend posting on the Postman Forum here to see if they can help you debug, since the Zoom request itself seems to work otherwise:
Thanks,
Will
Hey @will.zoom
Thanks, I will post to the POSTMAN group, I tried adding an initial value and still got a 401.
Hi @tommy,
I am still stuck on this and I have not heard anything from the POSTMAN group. How are individuals normally sending requests?
Hey @kannan1,
Sorry to hear youâre still having issues! I just DMâd you to set up a call to help debug, if youâd like.
Thanks,
Will
So after working with @will.zoom it seems like its an issue with POSTMAN not sending the body. I have a ticket out to them now, If I wanted to send a POST request as an AJAX what would I need to include in the header?
Hey @kannan1,
Good questionâthis would look something like this, with content-type
and authorization
headers:
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.zoom.us/v2/meetings/%7BmeetingId%7D/registrants",
"method": "POST",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {token}"
},
"processData": false,
"data": "{\"email\":\"myemail@mycompany.com\",\"first_name\":\"Mike\",\"last_name\":\"Brown\",\"address\":\"123 Main ST\",\"city\":\"San Jose\",\"country\":\"US\",\"zip\":\"95550\",\"state\":\"CA\",\"phone\":\"111-444-4444\",\"industry\":\"Tech\",\"org\":\"IT\",\"job_title\":\"DA\",\"purchasing_time_frame\":\"More Than 6 Months\",\"role_in_purchase_process\":\"Influencer\",\"no_of_employees\":\"1-20\",\"comments\":\"Excited to host you.\",\"custom_questions\":[{\"title\":\"Favorite thing about Zoom\",\"value\":\"Meet Happy\"}]}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Let me know if this helps,
Will