# The Token's Signature resulted invalid when verified using the Algorithm: HmacSHA256

**URL:** <https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492>\
**Category:** API and Webhooks\
**Created:** [July 26, 2018, 10:39am UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492 "2018-07-26T10:39:23Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murtuza\_Saleh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murtuza_saleh/32/674_2.png) [@Murtuza\_Saleh](https://devforum.zoom.us/u/Murtuza_Saleh)\
**Post date:** [July 26, 2018, 10:39am UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/1 "2018-07-26T10:39:23Z")

</div>

I am having an issue while calling get API for authentication in the access token.

I have created access token based on&nbsp;[https://jwt.io/](https://jwt.io/) but it gives me an error “The Token’s Signature resulted invalid when verified using the Algorithm: HmacSHA256” in Postman

 ![](https://support.zoom.us/hc/user_images/Ai1sc1YKTx4-eJ8ijLxpjA.png)

 ![](https://support.zoom.us/hc/user_images/KZC7ANvAf0iEKnmrUqQUUQ.png)

I have also tried with python&nbsp;pyjwt library to get access token but it gives me “Invalid access token” error in postman.

 ![](https://support.zoom.us/hc/user_images/HVzRYqX1fgTI5n01drTghQ.png)

 ![](https://support.zoom.us/hc/user_images/tO693jAPn3aOv8DhYSiT2Q.png)

Please let me know where I am going wrong, as I need to authenticate&nbsp;and Configure this immediately.

&nbsp;

---

<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:** [July 26, 2018, 4:32pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/2 "2018-07-26T16:32:39Z")

</div>

Hi Murtuza,&nbsp;

Can you confirm that your **exp** value is a date in the future?&nbsp;

Thanks

---

<div class="post-metadata">

**Author:** ![Murtuza\_Saleh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murtuza_saleh/32/674_2.png) [@Murtuza\_Saleh](https://devforum.zoom.us/u/Murtuza_Saleh)\
**Post date:** [July 27, 2018, 1:25pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/3 "2018-07-27T13:25:20Z")

</div>

Hello&nbsp;Michael,

Thanks,&nbsp;I changed exp value based on the correct timestamp and found 404 error (Page not found) while calling the authenticate method.

[https://api.zoom.us/v2/?access\_token=Newly](https://api.zoom.us/v2/?access_token=Newly) generated Token

 ![](https://support.zoom.us/hc/user_images/YdTLzSwxyRYted0zLKv9pA.png)  
Please let me know where I am going wrong.

---

<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:** [July 27, 2018, 4:18pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/4 "2018-07-27T16:18:48Z")

</div>

Hi Murtuza,&nbsp;

Please check your api call, you are missing the API endpoint - [https://api.zoom.us/v2/{endpoint}?accessToken](https://api.zoom.us/v2/%7Bendpoint%7D?accessToken)

What API are you trying to call?

Thanks

---

<div class="post-metadata">

**Author:** ![Murtuza\_Saleh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murtuza_saleh/32/674_2.png) [@Murtuza\_Saleh](https://devforum.zoom.us/u/Murtuza_Saleh)\
**Post date:** [July 30, 2018, 1:58pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/5 "2018-07-30T13:58:48Z")

</div>

Many Thanks,&nbsp;Michael,

It works when I added endpoints.

But when I call List of sub-account (get) method it raises me error {“code”: 124,&nbsp;“message”: “Invalid access token.”}.

[https://api.zoom.us/v2/accounts?page\_size=30&page\_number=1&access\_token=](https://api.zoom.us/v2/accounts?page_size=30&page_number=1&access_token=) Newly generated Token.

 ![](https://support.zoom.us/hc/user_images/vYDAtmjapMyayr-KE0KpGg.png)

---

<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:** [July 30, 2018, 4:55pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/6 "2018-07-30T16:55:10Z")

</div>

Hi Murtuza,

If you get an Invalid Access Token, please check to make sure your token has not expired by checking the exp value.&nbsp;

---

<div class="post-metadata">

**Author:** ![Murtuza\_Saleh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murtuza_saleh/32/674_2.png) [@Murtuza\_Saleh](https://devforum.zoom.us/u/Murtuza_Saleh)\
**Post date:** [August 1, 2018, 6:09am UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/7 "2018-08-01T06:09:45Z")

</div>

Hello&nbsp;Michael,

Everything is ok but I think the issue is an accounts API.

Below I have found the same issue.

[https://support.zoom.us/hc/en-us/community/posts/115020432263-Invalid-Access-Token-Error](https://support.zoom.us/hc/en-us/community/posts/115020432263-Invalid-Access-Token-Error)

[https://support.zoom.us/hc/en-us/community/posts/360000003043-401-error-when-calling-the-accounts-api-of-v2](https://support.zoom.us/hc/en-us/community/posts/360000003043-401-error-when-calling-the-accounts-api-of-v2)

---

<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:** [August 2, 2018, 3:53pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/8 "2018-08-02T15:53:26Z")

</div>

Hi&nbsp;Murtuza,&nbsp;

Just to confirm, is your issue resolved? If not, do you have sub accounts under the master account?

Thanks

---

<div class="post-metadata">

**Author:** ![Murtuza\_Saleh](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/murtuza_saleh/32/674_2.png) [@Murtuza\_Saleh](https://devforum.zoom.us/u/Murtuza_Saleh)\
**Post date:** [August 6, 2018, 7:05am UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/9 "2018-08-06T07:05:30Z")

</div>

Hello&nbsp;Michael,

No, I don’t&nbsp;have&nbsp;sub accounts under the master account but it gives me {“code”: 124,&nbsp;“message”: “Invalid access token.”} error.

---

<div class="post-metadata">

**Author:** ![Astm](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@Astm](https://devforum.zoom.us/u/Astm)\
**Post date:** [June 17, 2019, 12:24pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/10 "2019-06-17T12:24:28Z")

</div>

Guys, I’m also facing the same issue, my api response giving me  
The Token’s Signature resulted invalid when verified using the Algorithm: HmacSHA256  
and I’m sure that my Jwt token still not expire, mmmm what should be the reason for this case?

---

<div class="post-metadata">

**Author:** ![Astm](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@Astm](https://devforum.zoom.us/u/Astm)\
**Post date:** [June 17, 2019, 1:20pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/11 "2019-06-17T13:20:54Z")

</div>

Guys, I solved it and it’s working well now  
First I remove the old token which I generated from [https://jwt.io/](https://jwt.io/)  
and I used the zoom website [https://marketplace.zoom.us/develop/apps/](https://marketplace.zoom.us/develop/apps/)  
under the tab **app credentials** \> **View JWT Token**  
I generated new one and found it working well with me  
Thanks to you all

---

<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:** [June 17, 2019, 5:38pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/12 "2019-06-17T17:38:02Z")

</div>

Hi @Astm,

Glad you were able to resolve the issue. Let us know if you need anything else.

Thanks

---

<div class="post-metadata">

**Author:** ![bala.aitech](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bala.aitech/32/2425_2.png) [@bala.aitech](https://devforum.zoom.us/u/bala.aitech)\
**Post date:** [November 22, 2019, 7:48am UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/13 "2019-11-22T07:48:56Z")

</div>

Hello All, I am new to zoom API, i am also face same i generated access token but i cant generate jwt token, first i generate to show the error of missing admin scopes then i added and regenerated the accesstoken but show as invalid access token [https://api.zoom.us/v2/accounts?page\_size=30&page\_number=1&access\_token=](https://api.zoom.us/v2/accounts?page_size=30&page_number=1&access_token=)

---

<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:** [November 22, 2019, 7:26pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/14 "2019-11-22T19:26:57Z")

</div>

Hey @bala.aitech,

Can you try calling a different API, like the [GET Users API](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users)? Let me know if that works, if not then we know the access\_token / JWT is not being made correctly and I can help accordingly.

To call the [Accounts APIs](https://marketplace.zoom.us/docs/api-reference/zoom-api/accounts) you need to have special privilege.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![acandela](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@acandela](https://devforum.zoom.us/u/acandela)\
**Post date:** [April 16, 2020, 6:55pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/15 "2020-04-16T18:55:09Z")

</div>

Hi, I also tried this, but it doesn’t work for me  
I used the credentials in **View JWT Token**

---

<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 17, 2020, 7:48pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/16 "2020-04-17T19:48:58Z")

</div>

Hey @acandela,

Are you able to call the API with your [test JWT Token](https://marketplace.zoom.us/docs/guides/auth/jwt#testing)?

> [@The Token's Signature resulted invalid when verified using the Algorithm: HmacSHA256](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/14):
>
> Hey @bala.aitech, Can you try calling a different API, like the [GET Users API](https://marketplace.zoom.us/docs/api-reference/zoom-api/users/users)? Let me know if that works, if not then we know the access\_token / JWT is not being made correctly and I can help accordingly. To call the [Accounts APIs](https://marketplace.zoom.us/docs/api-reference/zoom-api/accounts) you need to have special privilege. Thanks, Tommy

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![bens1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bens1/32/12585_2.png) [@bens1](https://devforum.zoom.us/u/bens1)\
**Post date:** [July 28, 2020, 12:21am UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/17 "2020-07-28T00:21:30Z")

</div>

I’m running into this issue. Spent several minutes trying to post anything but I keep getting errors about new users can’t submit more than two URLs (even though I listed only two) so my entire post is hosted at

[http://effortlessis.com/zoom.hmac.txt](http://effortlessis.com/zoom.hmac.txt)

---

<div class="post-metadata">

**Author:** ![bens1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/bens1/32/12585_2.png) [@bens1](https://devforum.zoom.us/u/bens1)\
**Post date:** [July 29, 2020, 2:56pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/18 "2020-07-29T14:56:51Z")

</div>

Just to make sure progress is possible, I’m posting without any URLs:

1. I’m able to access the /users endpoint without issue using the test token from the credentials page.

2. When I try to create my own token using the jwt . io PHP 3.3 library, I get the error:  
(

3. Nowhere in the Token generation code can I see any passing of the secret. Based on my reading of your documentation, shouldn’t this be included in the token generation code from [jwt.io](http://jwt.io)? In your documentation the secret is part of the signature: https :// marketplace. zoom. us/docs/guides/auth/jwt

4. Sample Code:

// As per documentation https ://github. com/lcobucci/jwt/tree/3.3  
use Lcobucci\JWT\Builder;  
use Lcobucci\JWT\Signer\Key;  
use Lcobucci\JWT\Signer\Hmac\Sha256;

class JWT  
{  
[…]  
function genToken() {  
$iss = $this-\>apikey; // (This is the API key for my account)  
$signer = new Sha256();  
// $jti=rand(1, PHP\_INT\_MAX);  
$time = time() -1;  
$this-\>token = (new Builder())-\>issuedBy($iss) // Configures the issuer (iss claim)  
-\>permittedFor($iss) // Configures the audience (aud claim)  
// doesn’t seem to be used  
// -\>identifiedBy($jti, true) // Configures the id (jti claim), replicating as a header item  
-\>issuedAt($time) // Configures the time that the token was issue (iat claim)  
-\>canOnlyBeUsedAfter($time /\* +60 \*/) // Configures the time that the token can be used (nbf claim)  
-\>expiresAt($time + 3600) // Configures the expiration time of the token (exp claim)  
-\>withClaim(‘uid’, 1) // Configures a new claim, called “uid”  
-\>getToken($signer); // Retrieves the generated token  
return $this-\>token;  
}  
}  
[…]

### FROM ZOOM EXAMPLE

$curl = curl\_init();  
$token = “” . $JWT-\>genToken(); // force a string

## Note: if I comment this out, $token contains the sample token from your JWT App Credentials page

## and this works just fine.

// $token = $apiToken;  
curl\_setopt\_array($curl, array(  
CURLOPT\_URL =\> “http ://api. zoom. us/v2/users?status=active&page\_size=100&page\_number=1”,  
CURLOPT\_RETURNTRANSFER =\> true,  
CURLOPT\_ENCODING =\> “”,  
CURLOPT\_MAXREDIRS =\> 10,  
CURLOPT\_TIMEOUT =\> 30,  
CURLOPT\_HTTP\_VERSION =\> CURL\_HTTP\_VERSION\_1\_1,  
CURLOPT\_CUSTOMREQUEST =\> “GET”,  
CURLOPT\_HTTPHEADER =\> array(  
“authorization: Bearer $token”, //39ug3j309t8unvmlmslmlkfw853u8",  
“content-type: application/json”  
),  
));  
$response = curl\_exec($curl);  
$res = json\_decode($response);  
print\_r($res);

---

<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:** [July 31, 2020, 7:03pm UTC](https://devforum.zoom.us/t/the-tokens-signature-resulted-invalid-when-verified-using-the-algorithm-hmacsha256/1492/19 "2020-07-31T19:03:10Z")

</div>

Hey @bens1,

Please see our guide and libraries listed here on how to generate a JWT Token:

> **[JSON Web Tokens (JWT) - Authorization - Documentation](https://marketplace.zoom.us/docs/guides/auth/jwt)**
>
> JWT With Zoom
> 
> The Zoom API uses JSON Web Tokens (JWT) to authenticate account-level access. These tokens offer a method to establish secure server-to-s...

> **[JWT.IO](https://jwt.io/#libraries-io)**
>
> JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.

Thanks,  
Tommy
