Description
Details on your question, workflow or the problem you’re trying to solve.
I am getting this error
{“code”=>124, “message”=>“Invalid access token.”}
anytime i make a request. I am using this zoom library for ruby.
we have 2 jwt apps, one for staging and one for production. the one on staging still works. The one on production stopped working in June 27.
Nothing has changed on our end so we don’t know why all of a sudden one of the jwt app stopped working and was return code 124?
Please we need this resolved ASAP because it is currently affecting our business. We debugged this on our end and the conclusion is that this must be an external cause coming from your end. Please advise. Thanks.
Error?
{“code”=>124, “message”=>“Invalid access token.”}
How To Reproduce
-
$ gem install zoom_rb
-
require ‘zoom_rb’ inside irb
Zoom.configure do |c|
c.api_key = 'xxx'
c.api_secret = 'xxx'
end
zoom_client = Zoom.new
zoom_client.user_list
5 . the above command in rails console returns this error below.
{"code"=>124, "message"=>"Invalid access token."}
Additional Context
this is the class that produces the access token in the zoom library we use. It is according to your documentation
# frozen_string_literal: true
require 'jwt'
require 'logger'
module Zoom
class Client
class JWT < Zoom::Client
def initialize(config)
::Logger.new(STDOUT).warn('Zoom::Client::JWT is deprecated. Please use Zoom::Client::ServerToServerOAuth instead. See: https://developers.zoom.us/docs/internal-apps/jwt-faq/')
Zoom::Params.new(config).require(:api_key, :api_secret)
config.each { |k, v| instance_variable_set("@#{k}", v) }
self.class.default_timeout(@timeout || 20)
end
def access_token
::JWT.encode({ iss: @api_key, exp: Time.now.to_i + @timeout }, @api_secret, 'HS256', { typ: 'JWT' })
end
end
end
end