Hi Team,
Good Afternoon…!,
We are trying to integrate zoom API with oauth v2 to creating meetings in zoom but getting issue.
Please check the error:
Zoom::TooManyRequests ({:base=>“You have exceeded the daily rate limit (100) of Meeting Create/Update API requests permitted for this particular user. You may resume these requests at GMT 00:00:00.”}):
My code:
class ZoomRb < ApplicationRecord
def self.create_meeting
require "zoom_rb"
zoom_client = Zoom.new
auth = zoom_client.auth
zoom_client = Zoom::Client::OAuth.new(access_token: auth['access_token'], timeout: 15)
user_list = zoom_client.user_list
meeting_list = zoom_client.meeting_list(user_id: user_list['users'][0]['id'])
response = zoom_client.meeting_create(user_id: user_list['users'][0]['id'],topic: 'Freelancer-Client Meeting',type: 1, # Instant meeting
start_time: Time.now,
duration: 60, # in minutes
timezone: 'UTC' )
return response
end
end
module AccountBlock
class MeetingsController < ApplicationController
include BuilderJsonWebToken::JsonWebTokenValidation
before_action :validate_json_web_token
before_action :set_accounts, only: [:create]
def index
meetings = current_user.meetings_as_client
render json: { meeting: meetings }, status: :ok
end
def create
require "zoom_rb"
response = ZoomRb.create_meeting
meeting = Meeting.new(
freelancer: @freelancer,
client: @client,
zoom_meeting_id: response['id'],
start_time: response['start_time'],
duration: response['duration'],
details: response
)
if meeting.save
render json: { meeting: meeting, zoom_join_url: response['join_url'] }, status: :created
else
render json: meeting.errors, status: :unprocessable_entity
end
end
private
def set_accounts
@freelancer = Account.find(params[:freelancer_id])
@client = Account.find(current_user.id)
end
def current_user
@current_user ||= AccountBlock::Account.find(@token.id) if @token.present?
end
end
end
Please help me on this issue I am back end ruby developer