Server returned HTTP response code: 401. Rest implementation in java


#1

I tried to implement Zoom Rest service in java but I am getting some error like this:

 

java.io.IOException: Server returned HTTP response code: 401 for URL: https://api.zoom.us/v2/users?access_token=gySP1M3XWcg4uPBMvhTesy1zTHVOW7tX7jBN
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.example.Zoom.ZoomDev.main(ZoomDev.java:21)

 

 

 


#2

@Aadarsh, should include correct JWT token in the API request.


#3

Used this as well:

conn.setRequestProperty(“Authorization”, “Bearer <TOKEN ID>”);