I am using Android Meeting Sdk with SDK app with version 5.7.1.1267 and creating Json Web Token in backend which is required to fetch Zoom Access Token using jwt.io library and following code:
Date now = new Date(nowMillis);
long expMillis = nowMillis + 86400;
Date exp = new Date(expMillis);
String jwtToken = Jwts.builder()
.claim(“name”, “Jane Doe”)
.claim(“email”, “jane@example.com”)
.setSubject(“jane”)
.setId(UUID.randomUUID().toString())
.setIssuedAt(now)
.setExpiration(exp)
.compact();
@Megha1 – this is my mistake. You placed in the right spot initially because the error is pertaining to the API. Please excuse me, so I’ll move it back.
In this post you said the request is working in Postman, but not via your front end code:
Could you please clarify if that is still the case?
That was my previous discussion but now I am using Android Meeting Sdk with SDK app with version 5.7.1.1267 and creating Json Web Token in backend using java and maven which is required to fetch Zoom Access Token using jwt.io library and following code to generate token :
String secret = SDK_SECRET;
Key hmacKey = new SecretKeySpec(Base64.getDecoder().decode(secret),
SignatureAlgorithm.HS256.getJcaName());
long nowMillis = System.currentTimeMillis()/1000;
Date now = new Date(nowMillis);
long expMillis = nowMillis + 86400;
Date exp = new Date(expMillis);
String jwtToken = Jwts.builder()
.claim(“name”, “Jane Doe”)
.claim(“email”, “jane@example.com”)
.setSubject(“jane”)
.setId(UUID.randomUUID().toString())
.setIssuedAt(now)
.setExpiration(exp)
.signWith(hmacKey);
.compact();
I am using SDK_KEY and SDK_SECRET given in Sdk app and using this method to hit the API :
and using same method to fetch ZAK but this is also not working as I am getting same 401 error.
Please suggest me what should I do next and where I am wrong if possible as I tried with postman also and I am getting same there with message “Invalid access token”.