Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear documentation on OAuth clients #420

Open
teal-bauer opened this issue Apr 26, 2022 · 3 comments
Open

Unclear documentation on OAuth clients #420

teal-bauer opened this issue Apr 26, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@teal-bauer
Copy link

The README confused me when trying to make an OAuth app work because I didn't realize how to set client_id and client_secret and got opaque errors about api_key not being defined.

I would suggest two things:

  1. Make README more explicit, with separate subparts for JWT and OAuth flows, stating explicitly that for OAuth the api_key = client_id and api_secret = client_secret; and
  2. Adding method aliases for Zoom::Configuration so c.client_id = ... and c.client_secret = ... work
@kyleboe kyleboe added enhancement New feature or request good first issue Good for newcomers labels Apr 26, 2022
@kyleboe
Copy link
Owner

kyleboe commented Apr 10, 2023

I'll be cleaning this up as a part of #458 👍

@benterova
Copy link

Any update on this? Looks like the JWT deprecation has passed and OAuth implementation details are still sparse. Also looks like this PR doesn't include information relating to the differences between client and server-to-server OAuth.

@bockets
Copy link

bockets commented Mar 20, 2024

I took a slightly different approach than the README to get the necessary access token:

uri = URI.parse("https://zoom.us/oauth/token")
request = Net::HTTP::Post.new(uri)

# Get client_id, client_secret and account_id from the OAuth dashboard at https://marketplace.zoom.us/user/build
request.basic_auth(client_id, client_secret)
request.set_form_data(
  "grant_type" => "account_credentials",
  "account_id" => account_id,
)

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end

Then this response's access token can be plugged into an OAuth client:

Zoom::Client::OAuth.new(access_token: JSON.parse(response.body)["access_token"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants