POSTMAN Collections returns 401

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.

1 Like

Thanks @kannan1!

Let us know if you still aren’t able to resolve the issue.

-Tommy

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. :slight_smile:

Thanks,
Will

Thanks @will.zoom, I just scheduled time with you.

Thanks, @kannan1! Chat with you tomorrow.

Best,
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