API Endpoint(s)
- GET /v2/users
- GET /v2/users/{userId}/token
- POST https://zoom.us/oauth/token (Server-to-Server OAuth)
Description
The User API OpenAPI spec (ZoomUserAPI-spec.json) documents an invalid or expired access token as HTTP 400 with error code 124, and lists no 401 response:
GET /v2/users— responses: 200, 400, 403, 429GET /v2/users/{userId}/token— responses: 200, 400, 404, 429
The API actually returns 401 with the same error code. Could the spec and docs be updated to list 401 for error code 124?
Related: the Server-to-Server OAuth token endpoint has no documented error responses. Documenting them would help integrators handle failures.
Error?
GET https://api.zoom.us/v2/users
Authorization: Bearer invalid
→ 401 {"code":124,"message":"Invalid access token."}
GET https://api.zoom.us/v2/users (no Authorization header)
→ 401 {"code":124,"message":"Invalid access token."}
GET https://api.zoom.us/v2/users/me/token?type=zak
Authorization: Bearer invalid
→ 401 {"code":124,"message":"Invalid access token."}
OAuth token endpoint (undocumented):
POST https://zoom.us/oauth/token (invalid client_id or client_secret)
→ 400 {"error":"invalid_client","reason":"Invalid client_id or client_secret"}
POST https://zoom.us/oauth/token (invalid account_id)
→ 400 {"error":"invalid_request","reason":"Bad Request"}
How To Reproduce
- Send
GET https://api.zoom.us/v2/userswithAuthorization: Bearer invalid, or with noAuthorizationheader. - Authentication method: Server-to-Server OAuth app (not needed to reproduce the 401).
- The response is 401 with code 124, while the spec documents 400.