OAuth and Register User for Webinar via custom webform

Hi,
I’m trying to understand the flow I need to implement in order to register a user for a webinar via a bespoke form on a website. I understand that I need to use the following endpoint

and in order to do this I must first obtain an access token via oauth.

I’m currently using a GET request with the following endpoint to obtain my code so I can request an access token

https://zoom.us/oauth/authorize?response_type=code&client_id=x&redirect_uri=y
however, by this approach I’m redirected to a login screen.

Also the login screen sits on my redirect uri and appears to be broken given the captcha error.

Screenshot 2021-04-22 at 15.28.31

If I select to login via Google I’m redirected to what appears to be a zoom url on my own website domain which returns a 404

mydomain/oauth/google_login?client_id=x&response_type=code&redirect_uri=y

What I’m looking for is an approach where I can go by the following steps without the need for a user to login to a zoom account.

  1. user completes webform (name/surname/email)
  2. form data is posted to webserver
  3. access token is requested
  4. user data is posted to API to register for webinar
  5. user redirected to success page

Can you let me know if this flow is possible and if so what is it I’m doing wrong that I’m redirected to a login page

Thanks!
Chris

Hi @chris.post,

Thanks for reaching out about this, and happy to help.

First, I should clarify—are you interested in registering users for webinars under an account you manage? Or, are you trying to create functionality for Zoom users to be able to register participant to their own webinars using your integration?

If it’s the first, I might actually recommend using JWT authorization, as this is server-to-server and doesn’t require any end-user auth directly:

You could use your JWT credentials to authenticate requests to the add webinar registrants endpoint directly:

Let me know if this might be more helpful for your use case!

Thanks,
Will

Hi Will,
thanks for your reply. I’ve got the JWT app set up and its generating the token successfully for me so thanks for that! What I’m seeing now is that I get a ‘Meeting does not exist’ error when trying to post first_name/last_name/email to the following endpoint
https://api.zoom.us/v2/meetings/’.$webinarid.’/registrants
where $webinarid is the id of the meeting I’m trying to register users on.
Perhaps a stupid question but it is required that my app on the Zoom app marketplace is created on the same account on which the webinar has been created?
Thanks!

Hey @chris.post,

Thanks for sharing these details. To clarify, the credentials you’re using to authenticate your call must be associated with the account under which the Webinar was created. Can you confirm if this is the case? You won’t be able to register participants to a webinar that you don’t own.

Let me know if this helps to clarify,
Will

Thanks for the reply Will! I guessed as much, I’ll contact the user who’s webinar I’m connecting in order to have the app created on their account :slight_smile:

Hi Will,
I’ve resolved the issue with the account and I’m now working with a JWT app on the same account where the webinar has been created. However, when trying to register participants using the following endpoint its returning an error

POST # /meetings/{meetingId}/registrants

{“code”:404,“message”:“Registration has not been enabled for this meeting: xxxxxxxxx.”}

I’m not seeing any option in the Webinar itself to enable registration, and I can still register using the link provided on the webinar details

Thanks!

Hey @chris.post,

I’m glad to hear that Will was able to help get you set up with JWT! It sounds like you’re trying to add a registrant to a webinar but using the API for meetings.

Try using the Add Webinar Registrant API which uses the following endpoint:

POST /webinars/{webinarId}/registrants

Let us know if that works for you.

Thanks,
Max

Ah that was a silly error, thanks for letting me now, all is working now :slight_smile:

1 Like

Greeting, @chris.post,
Great to hear Will and Max was able to help. We appreciate you allowing us to provide support. Should you have any additional questions or comments, please let us know.

Best,
Donte