# Signature is invalid, again

**URL:** <https://devforum.zoom.us/t/signature-is-invalid-again/31127>\
**Category:** Web\
**Created:** [September 23, 2020, 7:37pm UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127 "2020-09-23T19:37:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgilbert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mgilbert/32/9341_2.png) [@mgilbert](https://devforum.zoom.us/u/mgilbert)\
**Post date:** [September 23, 2020, 7:37pm UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127/1 "2020-09-23T19:37:37Z")

</div>

**Description**  
We’ve used the Zoom Web SDK successfully in the past on a different site with this ruby on rails code on the backend generating the signature:

```
def signature
    require "base64"
    require 'openssl'
    timestamp = (Time.now.to_f * 1000).to_i - 30000
    meeting_number = params["meeting_number"]
    role = 0 # 0 for participant, 1 for host

    message = Base64.strict_encode64("#{ENV["ZOOM_API_KEY"]}#{meeting_number}#{timestamp}#{role}")
    hash = Base64.strict_encode64(OpenSSL::HMAC.digest('sha256', ENV["ZOOM_API_SECRET"], message))
    signature = Base64.strict_encode64("#{ENV["ZOOM_API_KEY"]}.#{meeting_number}.#{timestamp}.#{role}.#{hash}")

    render json: {
      msg: "Success",
      signature: signature
    }
  end

```

I’ve verified that ENV[“ZOOM\_API\_KEY”] and ENV[“ZOOM\_API\_SECRET”] are accurate by checking in the rails console in staging. I’ve deployed again just to force a restart, and ensure that ENV variables are reloaded.

**Error**  
When this signature generated in this way is used on a Zoom embed, the embed remains black and a message appears that says “Signature is invalid”. The error code in the js console says the error code is 3712.

**Which version?**  
1.7.9

**Screenshots**  
Passcode obscured, not that it’s important. This is just a test meeting.

 ![Screen Shot 2020-09-23 at 3.33.55 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/a72913d77131a4c8db00a127b83336e28e8fc884.png)  
 ![Screen Shot 2020-09-23 at 3.33.24 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/5/549c4ae6120144bfccf2aade075d8a9468a4904d.png)

**Additional context**  
Macbook, Chrome broswer Version 85.0.4183.102

---

<div class="post-metadata">

**Author:** ![mgilbert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mgilbert/32/9341_2.png) [@mgilbert](https://devforum.zoom.us/u/mgilbert)\
**Post date:** [September 23, 2020, 7:50pm UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127/2 "2020-09-23T19:50:08Z")

</div>

I get the same error with version 1.7.10, and 1.8.0.

---

<div class="post-metadata">

**Author:** ![mgilbert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mgilbert/32/9341_2.png) [@mgilbert](https://devforum.zoom.us/u/mgilbert)\
**Post date:** [September 23, 2020, 8:23pm UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127/3 "2020-09-23T20:23:16Z")

</div>

The generated signature is:

---

<div class="post-metadata">

**Author:** ![mgilbert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mgilbert/32/9341_2.png) [@mgilbert](https://devforum.zoom.us/u/mgilbert)\
**Post date:** [September 23, 2020, 11:03pm UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127/4 "2020-09-23T23:03:26Z")

</div>

Nevermind. I was using the wrong API/Secret.

---

<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:** [September 24, 2020, 8:43pm UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127/5 "2020-09-24T20:43:43Z")

</div>

Happy to hear you got it sorted out! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 25, 2020, 6:43am UTC](https://devforum.zoom.us/t/signature-is-invalid-again/31127/6 "2020-10-25T06:43:45Z")

</div>

Closed on October 25, 2020, 6:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
