Joining Meeting Timeout or Browser restriction

I’m testing zoom/react-sample-app i create meeting using API in Laravel the meeting created successfully but when i try to join using react-sample-app it show this error

@abdullahahsin0 ,

could you share your JWT token and tag me in you response?

I’m using this package to create meeting in Laravel

Response of the create meeting is attached.

I’m Using the meeting id which is receive in this response.

In the above i show you the code of the react-sample-app. i get the authEndpoint using meetingsdk-auth-endpoint-sample in localhost.

and when i click to join meeting button the error comes which i already post,

@abdullahahsin0 , I’ll PM you for the JWT token

From Where i get JWT token?

@abdullahahsin0 ,

I think I understand what your issue might be. In the account there might be a setting which is blocking users from joining from web browser.

Could you check this setting?

https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0067293#:~:text=menu%2C%20click%20Settings.-,Click%20the%20Meeting%20tab.,the%20group%20or%20account%20level.

But when i use the link which is provided in createmeeting api. its work perfectly. but when i try to join meeting using meetingsdk-react-sample-app it show error invalid_signature

My signature get from meetingsdk-auth-endpoint-sample
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZGtLZXkiOiJyTzc0RFRZVFRBaTI4ZnJ3QkNoMUV3IiwibW4iOiI3ODM4MzA4NzYwNyIsInJvbGUiOjAsImlhdCI6MTcwNTQ5MDAwMywiZXhwIjoxNzA1NDk3MjAzLCJhcHBLZXkiOiJyTzc0RFRZVFRBaTI4ZnJ3QkNoMUV3IiwidG9rZW5FeHAiOjE3MDU0OTcyMDN9.jdnUIoqve6SdfQPUWB1EuGoovU-nXlh9MiazWPvM3vw

@abdullahahsin0 ,

Could you share where you are getting your sdkKey / appKey?

This should be the clientID found on the Meeting SDK app / General app.

If anyone else encountered this, as well as seeing issues with the 2.x.x sample apps, here is your fix…

Instead of specifying Milliseconds in the LinuxEpochTimestamp, use seconds. Zoom did something to break it. I use c# but you can probably translate this change to any other language easily.

private long getLinuxEpochTimestamp()
{
    // Zoom uses seconds and not milliseconds now
	return (long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds;

    // This used to work
	//return (long) DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds;
}
public string GenerateSignature(int role, long meetingNumber)
{
	// Prevent time sync issue between client signature generation and zoom 
	long timeStamp = this.getLinuxEpochTimestamp();

	long exp = timeStamp + 7200;

	List<Claim> claims = new List<Claim>
		{
			new Claim("sdkKey", _plusConfig.Value.ZoomApiKey),
			new Claim("appKey", _plusConfig.Value.ZoomApiKey),
			new Claim("iat", timeStamp.ToString(), ClaimValueTypes.Integer64),
			new Claim("exp", exp.ToString()),
			new Claim("mn", meetingNumber.ToString(), ClaimValueTypes.Integer64),
			new Claim("role", role.ToString(), ClaimValueTypes.Integer64)
		};

	
	ASCIIEncoding encoding = new ASCIIEncoding();
	byte[] keyByte = encoding.GetBytes(_plusConfig.Value.ZoomApiSecret);
	SymmetricSecurityKey securityKey = new SymmetricSecurityKey(keyByte);
	SigningCredentials credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);

	JwtSecurityToken secToken = new JwtSecurityToken(
		null,
		null,
		claims,
		DateTime.UtcNow,
		DateTime.UtcNow.AddHours(2),
		credentials);

	secToken.Payload.Remove("nbf");
	JwtSecurityTokenHandler handler = new JwtSecurityTokenHandler();
	string signature = handler.WriteToken(secToken);

	return signature;
}

The code above generates a signature identical to the one generated by the sample app. Please change your iat and exp from milliseconds to seconds.