Skip to content
HooprB2B

Operations

Errors

Errors use the same envelope as success responses, with error.code set to 1, a human-readable message, and a stable machine-readable type.

Error shape

On failure, data is null and error carries code: 1, a human message, and a stable type you can branch on:

{
  "data": null,
  "error": {
    "code": 1,
    "message": "Token invalid or expired",
    "type": "invalid_token"
  }
}

Error reference

HTTPerror.typeMeaning
400invalid_requestValidation failed (message lists the fields)
401missing_tokenNo / malformed Authorization header
401invalid_tokenToken invalid or expired — get a new one
401invalid_clientBad client_id / client_secret
403insufficient_scopeToken lacks the required scope
403client_inactiveYour client has been deactivated
403playlist_restrictedNo access to that playlist
404track_not_found / playlist_not_foundUnknown resource
429rate_limitedToo many requests — back off and retry
503Temporary outage — retry with backoff
  • Cache the access token until ~5 minutes before expires_in, then refresh.
  • On 401 invalid_token, fetch a new token once and retry the call.
  • On 429 / 503, retry with exponential backoff.

See Rate limits and Best practices.