"Signuture is invalid" CDN 1.7.10 JS Viewer

Hi

I’m trying to use the 1.7.10 JS viewer (CDN version) (https://github.com/zoom/sample-app-web), but I get error “Signuture is invalid” when I enter real meeting number, example (***********, no password, no email, attendee ).

It would be great if you can help me with this.

thanks for future answer !

jan

*This post has been edited to remove any meeting / webinar IDs

Hey @j.amelsberg,

Please share your signature to developersupport@zoom.us so I can help you debug.

Thanks,
Tommy

hello, @tommy my signature is next:
signature=
thanks

Hey @j.amelsberg,

It appears you are using your SDK App Key and Secret to generate the signature. You need to use your JWT Key and Secret app to generate the signature.

Thanks,
Tommy

hello @tommy,

it works. thanks

1 Like

Happy to hear you got it working! :slight_smile:

Thanks,
Tommy

Hi @tommy

I tried to use JWT key but still got ‘Signature is invalid’

```
require 'Base64'
require 'openssl'

def get_signature(options = {})
  time = (Time.now.to_i * 1000 - 30000).to_s
  data = Base64.urlsafe_encode64(options[:api_key] + options[:meeting_number] + time + options[:role].to_s)
  hash = Base64.urlsafe_encode64(OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), options[:api_secret], data))
  tempStr = options[:api_key] + '.' + options[:meeting_number] + '.' + time + '.' + options[:role].to_s + '.' + hash
  return Base64.urlsafe_encode64(tempStr).gsub('+', '-').gsub('/', '_').gsub(/#{Regexp.escape('=')}+$/, '')
end

data = {
  'meeting_number': '99999999',
  'role': 0,
  'api_secret': 'xxxx',
  'api_key': 'xxxx'
}

puts get_signature(data)
```

I use this code to generate signature on server. and pass it to client.

But when I use https://github.com/zoom/websdk-sample-signature-node.js. I got error: ‘The service is temporarily offline’

If I use JS, it works. Hzz. I don’t know why. Ruby code is something wrong?

ZoomMtg.generateSignature({
      apiKey: xxxxxxx,
      apiSecret: xxxxxxx,
      role: parseInt(meetingRole, 10),
      meetingNumber: meetingId,
      success: function (res) {
        meetingConfig = {
          apiKey: xxxxxxxx,
          meetingNumber: meetingId,
          userName: username,
          passWord: meetingPwd,
          leaveUrl: "/meetings",
          role: parseInt(meetingRole, 1),
          userEmail: username,
          lang: 'en-US',
          signature: res.result,
          china: false
        };

        beginJoin(meetingConfig);
      },
    });

@tommy Please help. I must do it asps.

Hey @nhat.nguyen,

Please share your Web SDK signature for a test meeting to developersupport@zoom.us so I can help debug.

Thanks,
Tommy

def get_signature(options = {})
  time = (Time.now.to_i * 1000 - 30000).to_s
  data = Base64.urlsafe_encode64(options[:api_key] + options[:meeting_number] + time + options[:role].to_s)
  hash = Base64.urlsafe_encode64(OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha256'), options[:api_secret], data))
  tempStr = options[:api_key] + '.' + options[:meeting_number] + '.' + time + '.' + options[:role].to_s + '.' + hash
  return Base64.urlsafe_encode64(tempStr).gsub('+', '-').gsub('/', '_').gsub(/#{Regexp.escape('=')}+$/, '')
end

I change Base64.urlsafe_encode64 to Base64.strict_encode64 and It works. Do you have any idea about this problem?

Can you check it again and update your tutorial.

@tommy

Hey @nhat.nguyen,

Happy to hear you got it working. :slight_smile:

What language are you using to generate the signature?

Thanks,
Tommy

@tommy I used Ruby language.

@tommy I am getting same issue with reactjs language .

Hey @hs99215, @nhat.nguyen,

Please share your Web SDK signature for a test meeting to developersupport@zoom.us so I can help debug the issue.

Thanks,
Tommy