Access token is required


#1

 Hi,

I get {“code”:124,“message”:“Access token is required.”} when I use zoom v2. I use jjwt lib for java. Below is the code.

public static List<UserMeetings> futureMeetingList(String email) throws Exception {
Date exp = new Date(System.currentTimeMillis() + 100000);
Map<String,Object> form = new HashMap<String,Object>();
form.put(“iss”, api_key);
form.put(“exp”, exp.getTime());
form.put(“type”, “scheduled”);
form.put(“page_size”, 1);
form.put(“page_number”, 1);
byte key = api_secret.getBytes();
String base64Encodedkey = TextCodec.BASE64.encode(key);
System.out.println(base64Encodedkey);
String compact = Jwts.builder().setClaims(form).setExpiration(exp)
.signWith(SignatureAlgorithm.HS256, base64Encodedkey).compact();
System.out.println(compact);
List<UserMeetings> allUsersList = new ArrayList<UserMeetings>();
ClientConfig config = new DefaultClientConfig();
config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
config.getClasses().add(JacksonJsonProvider.class);
Client client = Client.create(config);
client.addFilter(new LoggingFilter(System.out));
String meetingurl = futureMeetingUrl.replaceAll(“userId”, URLEncoder.encode(email, “UTF-8”));
System.out.println(meetingurl);
WebResource service = client.resource(meetingurl);
ClientResponse response = service
.type(MediaType.APPLICATION_FORM_URLENCODED).accept(MediaType.APPLICATION_JSON)
.post(ClientResponse.class, compact);
System.out.println("Form response " + response.getEntity(String.class));
return allUsersList;
}

Thanks.


#2

Hi Magesh, 

Would you be able to tell us what API you are using? 


#3

Hi Michael,

We’re using the below REST API

https://api.zoom.us/v2/users/{userId}/meetings

Thanks


#4

Hi Magesh, 

Were you able to use your correct API Key & secret provide by our developer portal? https://developer.zoom.us/me/#api


#5

Yes, it works in the portal


#6

Hi Magesh, 

Could you email us your account ID to developersupport@zoom.us so that we can take a closer look?


#7

Thanks Michael, I got it working.