# Invalid Signature with Sample Web App

**URL:** <https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005>\
**Category:** Web\
**Created:** [April 23, 2019, 1:35am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005 "2019-04-23T01:35:44Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![utkrist](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/utkrist/32/3962_2.png) [@utkrist](https://devforum.zoom.us/u/utkrist)\
**Post date:** [March 23, 2020, 10:06am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/41 "2020-03-23T10:06:43Z")

</div>

I disabled the password so it is not a problem now, but i am getting another error ‘Meeting not started’ even though the meeting has been started.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 23, 2020, 10:16pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/42 "2020-03-23T22:16:11Z")

</div>

Hey @utkrist, thanks for posting and using Zoom!

What is the meeting number?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![gabriele.limonta](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@gabriele.limonta](https://devforum.zoom.us/u/gabriele.limonta)\
**Post date:** [April 2, 2020, 2:18pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/43 "2020-04-02T14:18:49Z")

</div>

HI Tommy/Team, I have cloned the github sample app and deployed it on glitch. I also created my signature with heroku. Can you please guide me on how to modify the index.js code to add a http post so that zoom.mtg can get my signature? Hope that my explanation is clear. Thanks!

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 3, 2020, 12:13am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/44 "2020-04-03T00:13:25Z")

</div>

Hey @gabriele.limonta,

Nice job!

There are a few ways you can [make a post request in JavaScript](https://www.freecodecamp.org/news/here-is-the-most-popular-ways-to-make-an-http-request-in-javascript-954ce8c95aaa/).

Once you choose a method, just put in your [heroku url and request body](https://github.com/zoom/websdk-sample-signature-node.js#usage) 🙂

Let me know if that helps!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![gabriele.limonta](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@gabriele.limonta](https://devforum.zoom.us/u/gabriele.limonta)\
**Post date:** [April 11, 2020, 9:33am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/45 "2020-04-11T09:33:59Z")

</div>

Hi Tommy,

I have added one of the methods suggested and I can generate the signature but it always return me

1. {method: “join”, status: false, result: null, errorMessage: undefined, errorCode: 1}

2. method: “join”

3. status: false

4. result: null

5. errorMessage: undefined

6. errorCode: 1

7. **proto** : Object

This is the webapp on glitch [https://zoom-sample-app-web-1.glitch.me/CDN/](https://zoom-sample-app-web-1.glitch.me/CDN/)

I would be grateful if you could have a look.

Thanks!

---

<div class="post-metadata">

**Author:** ![gabriele.limonta](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@gabriele.limonta](https://devforum.zoom.us/u/gabriele.limonta)\
**Post date:** [April 13, 2020, 3:43am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/46 "2020-04-13T03:43:13Z")

</div>

![screen](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/4/40f9b86a646486e1a588c3cb5d7694cceb396a58.jpeg)

Ths is the screenshot fo the error

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 13, 2020, 10:42pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/47 "2020-04-13T22:42:22Z")

</div>

Hey @gabriele.limonta,

Looks like you are trying to start your own meeting.

Are you passing in `1` for the `meetConfig.role`?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![gabriele.limonta](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@gabriele.limonta](https://devforum.zoom.us/u/gabriele.limonta)\
**Post date:** [April 13, 2020, 11:05pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/48 "2020-04-13T23:05:17Z")

</div>

No, I pass 0. I tried by pass 0,1 and 5 but it always returns me the same error. Is it possible to send you the code in DM?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 14, 2020, 7:57pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/49 "2020-04-14T19:57:01Z")

</div>

Hey @gabriele.limonta,

Double check you are passing in the signature correctly. The response from your signature endpoint is being converted to text and not JSON, and you need to pass in the actual signature, not just the object returned from the endpoint.

`response.signature`

> <https://github.com/zoom/websdk-sample-angular/blob/master/src/app/app.component.ts#L41>

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![gabriele.limonta](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@gabriele.limonta](https://devforum.zoom.us/u/gabriele.limonta)\
**Post date:** [April 22, 2020, 2:12pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/50 "2020-04-22T14:12:44Z")

</div>

Many thanks Tommy. It works well now 🙂

Is there any timeline update on the fully responsive web SDK?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [April 23, 2020, 9:26pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/51 "2020-04-23T21:26:21Z")

</div>

Happy to hear you got it working! 🙂

No timeline set in stone, but either later this year, or next year.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![deepak2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/deepak2/32/7763_2.png) [@deepak2](https://devforum.zoom.us/u/deepak2)\
**Post date:** [May 5, 2020, 7:27pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/52 "2020-05-05T19:27:38Z")

</div>

Hey @tommy,

Will you help me with generating the signature in Ruby.

So far I have tried below code:

```
 ts = (Time.now.to_f * 1000).round(0) - 30000
  msg = Base64.strict_encode64(@api_key + @meeting_number + ts.to_s + @role)

  digest = OpenSSL::Digest::SHA256.new
  hmac = OpenSSL::HMAC.new(@api_secret, digest)
  hmac << msg
  hash = Base64.encode64(hmac.digest)

  signature = Base64.urlsafe_encode64("#{@api_key}.#{@meeting_number}.#{ts.to_s}.#{@role}.#{hash}")

```

Error: /\*\*/localJsonpCallback({“status”:false,“errorCode”:200,“errorMessage”:“Invalid signature.”,“result”:null});

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [May 10, 2020, 11:16pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/53 "2020-05-10T23:16:33Z")

</div>

Hi @deepak2,

Can you make sure that your systems settings is up to date? Please see my comment on this post -  
[Join meeting timeout or signature expired](https://devforum.zoom.us/t/join-meeting-timeout-or-signature-expired/8616/14).

---

<div class="post-metadata">

**Author:** ![deepak2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/deepak2/32/7763_2.png) [@deepak2](https://devforum.zoom.us/u/deepak2)\
**Post date:** [May 13, 2020, 3:56pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/54 "2020-05-13T15:56:02Z")

</div>

I was able to solve this in Ruby.

---

<div class="post-metadata">

**Author:** ![michael\_p.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_p.zoom/32/18105_2.png) [@michael\_p.zoom](https://devforum.zoom.us/u/michael_p.zoom)\
**Post date:** [May 15, 2020, 11:43pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/55 "2020-05-15T23:43:30Z")

</div>

Hi @deepak2,

We’re glad that you were able to resolve the issue. We’ll update our Generate Signature docs to include a Ruby example - [https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature](https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature)

Let us know if you need anything else.

Thanks

---

<div class="post-metadata">

**Author:** ![anthony](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anthony/32/8557_2.png) [@anthony](https://devforum.zoom.us/u/anthony)\
**Post date:** [May 16, 2020, 3:27am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/56 "2020-05-16T03:27:41Z")

</div>

I didn’t see any ruby examples here:

> **[Generate Signature - Essential Guides - Web - Native SDKs - Zoom Software...](https://marketplace.zoom.us/docs/sdk/native-sdks/web/essential/signature)**
>
> Generate Signature
> 
> Each request to Start or Join a Meeting / Webinar must be verified by an encrypted signature authorizing the user to enter.
> 
> The sig...

Do you have an example somewhere?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 19, 2020, 9:13pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/57 "2020-05-19T21:13:10Z")

</div>

Hey @deepak2,

Can you share the Ruby code function you developed? We would be happy to add it to the docs. 🙂

CC @anthony

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![deepak2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/deepak2/32/7763_2.png) [@deepak2](https://devforum.zoom.us/u/deepak2)\
**Post date:** [May 20, 2020, 7:12am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/58 "2020-05-20T07:12:52Z")

</div>

Yes. Sure.

Below is the code:

```
require "base64"
require "openssl"

module Zoom
  class SignatureGenerator
    def initialize(meeting_number)
      @meeting_number = meeting_number
      @api_key = "< api key >"
      @api_secret = "< api secret >"
      @role = "0" # for attendee
    end

    def encode64s(value)
      Base64.strict_encode64(value)
    end

    def signature
      ts = (Time.now.to_f * 1000).round(0) - 30000
      msg = encode64s(@api_key + @meeting_number + ts.to_s + @role)

      hash = encode64s(OpenSSL::HMAC.digest("sha256", @api_secret, msg))
      encode64s("#{@api_key}.#{@meeting_number}.#{ts.to_s}.#{@role}.#{hash}")
    end
  end
end
```

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [May 26, 2020, 5:07pm UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/59 "2020-05-26T17:07:38Z")

</div>

Thanks @deepak2! 🙂

@anthony, check out the ruby example! ^

-Tommy

---

<div class="post-metadata">

**Author:** ![aokirihito](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/aokirihito/32/9283_2.png) [@aokirihito](https://devforum.zoom.us/u/aokirihito)\
**Post date:** [June 1, 2020, 8:32am UTC](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005/60 "2020-06-01T08:32:45Z")

</div>

hello deepak2

I also tried to generate signature in ruby on rails like this

```auto
def signature
logger.info params
timestamp = (Time.now.to_f * 1000).to_i - 30000
logger.info timestamp
message = Base64.strict_encode64("#{params[:apiKey]}#{params[:meetingNumber]}#{timestamp}#{params[:role]}")
hash = Base64.strict_encode64(OpenSSL::HMAC.digest(‘sha256’, params[:apiSecrete], message))
signature = Base64.strict_encode64("#{params[:apiKey]}.#{params[:meetingNumber]}.#{timestamp}.#{params[:role]}.#{hash}")

respond_to do |format|
  format.json { render json: {signature: signature} }
end
end

```

I think it’s same to your code  
But it works with meetings created only one account.  
If i use MeetingID created another account this Error shows  
“Your connection has timed out and you cannot join the meeting. Verify your network connectivity and try again.”  
please help me!

[Previous page](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005.md?page=2)

[Next page](https://devforum.zoom.us/t/invalid-signature-with-sample-web-app/4005.md?page=4)
