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
tommy
(Tommy Gaessler)
July 20, 2020, 8:13pm
2
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
tommy
(Tommy Gaessler)
July 22, 2020, 6:16pm
4
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
tommy
(Tommy Gaessler)
July 24, 2020, 5:40pm
6
Happy to hear you got it working!
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.
tommy
(Tommy Gaessler)
August 19, 2020, 3:32am
9
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
tommy
(Tommy Gaessler)
August 19, 2020, 10:06pm
11
Hey @nhat.nguyen ,
Happy to hear you got it working.
What language are you using to generate the signature?
Thanks,
Tommy
@tommy I used Ruby language.
hs99215
(HarrY)
August 24, 2020, 11:07am
13
@tommy I am getting same issue with reactjs language .
tommy
(Tommy Gaessler)
August 26, 2020, 7:55pm
14
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