User API spec documents 400 for invalid access tokens, but the API returns 401

API Endpoint(s)

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, 429
  • GET /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

  1. Send GET https://api.zoom.us/v2/users with Authorization: Bearer invalid, or with no Authorization header.
  2. Authentication method: Server-to-Server OAuth app (not needed to reproduce the 401).
  3. The response is 401 with code 124, while the spec documents 400.