# The signature has expired while error using JAVA jwt

**URL:** <https://devforum.zoom.us/t/the-signature-has-expired-while-error-using-java-jwt/89362>\
**Category:** Web\
**Created:** [May 31, 2023, 12:46pm UTC](https://devforum.zoom.us/t/the-signature-has-expired-while-error-using-java-jwt/89362 "2023-05-31T12:46:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hariprasad](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@hariprasad](https://devforum.zoom.us/u/hariprasad)\
**Post date:** [May 31, 2023, 12:46pm UTC](https://devforum.zoom.us/t/the-signature-has-expired-while-error-using-java-jwt/89362/1 "2023-05-31T12:46:43Z")

</div>

**Description**  
Hi team,  
I am using JAVA-JWT to generate signatures in the backend and passing them to the client, but we are getting an error _The signature has expired_  
Please help me resolve this issue. I have added a few details below:

**Browser Console Error**  
— errorCallBack —  
{method: ‘join’, status: false, result: ‘The signature has expired.’, errorMessage: ‘The signature has expired.’, errorCode: 3705}

**Which Web Meeting SDK version?**  
2.12.2

**Meeting SDK Code Snippets**  
\*\*Server Side \*\*

```plaintext
val header = Map(
	"alg" -> "HS256",
	"typ" -> "JWT"
)

val currentTime = System.currentTimeMillis()
val expTime = (currentTime + 86400000).toString //24 * 60 * 60 * 1000= HR * MIN * SEC * milliseconds

val jwt = JWT.create()
	.withHeader(JavaConverters.mapAsJavaMap(header))
	.withClaim("appKey", ZOOM_SDK_API_KEY)
	.withClaim("sdkKey", ZOOM_SDK_API_KEY)
	.withClaim("mn", meetingId)
	.withClaim("role", 1)
	.withClaim("iat", currentTime.toString)
	.withClaim("exp", expTime)
	.withClaim("tokenExp", expTime)

jwt.sign(Algorithm.HMAC256(ZOOM_SDK_API_SECRET))

```

```javascript
ZoomMtg.init({
			debug: !isProduction,
			disableInvite:true,
			isSupportAV: true,
			success: function(res) {
				ZoomMtg.join({
					meetingNumber: meetingConfig.meetingNumber,
					userName: meetingConfig.userName,
					signature: meetingConfig.signature,
					sdkKey: meetingConfig.sdkKey,
					userEmail: meetingConfig.userEmail,
					passWord: meetingConfig.passWord,
					tk:meetingConfig.token
				})
			}
		});

```

**Screenshots**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/b/ab656340048cee0cf486b1d32e6b21145c604669.png)

**Troubleshooting Routes**  
The troubleshooting attempt types you’ve already exhausted, including testing with the appropriate sample app (found on [Zoom · GitHub](https://github.com/zoom)).

**Device (please complete the following information):**

- Device: Dell
- OS: Ubuntu 22.0
- Browser: Chrome
- Browser Version 113.0.5672.126 (Official Build) (64-bit)

**Additional context**  
Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![j.schoenemeyer](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@j.schoenemeyer](https://devforum.zoom.us/u/j.schoenemeyer)\
**Post date:** [May 31, 2023, 3:48pm UTC](https://devforum.zoom.us/t/the-signature-has-expired-while-error-using-java-jwt/89362/2 "2023-05-31T15:48:38Z")

</div>

iat, exp, tokenExp must be defined in seconds (not milliseconds)

[https://developers.zoom.us/docs/meeting-sdk/auth/#sample-code](https://developers.zoom.us/docs/meeting-sdk/auth/#sample-code)

[here](https://jwt.io/) you can check your signature

---

<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:** [July 1, 2023, 1:48am UTC](https://devforum.zoom.us/t/the-signature-has-expired-while-error-using-java-jwt/89362/3 "2023-07-01T01:48:49Z")

</div>

Closed on July 1, 2023, 1:48am UTC

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