Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(sdk): describe a 403 as a role or scope refusal
Yudhi Armyndharisf1b220110b6c
diff --git a/sdk/go/errors.go b/sdk/go/errors.goindex 3f7724041..89c96eeb8 100644--- a/sdk/go/errors.go+++ b/sdk/go/errors.go@@ -23,7 +23,8 @@ var (ErrBadRequest = errors.New("openwa: bad request")// ErrUnauthorized is returned for a 401 (missing or invalid API key).ErrUnauthorized = errors.New("openwa: unauthorized")- // ErrForbidden is returned for a 403 (insufficient role).+ // ErrForbidden is returned for a 403: the API key's role or scope (session,+ // IP or chat allow-list) refuses the call.ErrForbidden = errors.New("openwa: forbidden")// ErrNotFound is returned for a 404.ErrNotFound = errors.New("openwa: not found")diff --git a/sdk/java/README.md b/sdk/java/README.mdindex bfc5b85b8..ca7304969 100644--- a/sdk/java/README.md+++ b/sdk/java/README.md@@ -110,7 +110,7 @@ try {| Class | HTTP | Meaning || ------------------------------- | ---- | --------------------------------------- || `OpenWAAuthError` | 401 | Missing or invalid API key |-| `OpenWAForbiddenError` | 403 | API key role insufficient |+| `OpenWAForbiddenError` | 403 | API key role or scope refuses the call || `OpenWANotFoundError` | 404 | Resource not found || `OpenWAConflictError` | 409 | Engine not ready || `OpenWARateLimitError` | 429 | Rate limited |diff --git a/sdk/java/src/main/java/com/rmyndharis/openwa/errors/OpenWAForbiddenError.java b/sdk/java/src/main/java/com/rmyndharis/openwa/errors/OpenWAForbiddenError.javaindex 6fa68673d..852e2e0ad 100644--- a/sdk/java/src/main/java/com/rmyndharis/openwa/errors/OpenWAForbiddenError.java+++ b/sdk/java/src/main/java/com/rmyndharis/openwa/errors/OpenWAForbiddenError.java@@ -3,7 +3,7 @@ package com.rmyndharis.openwa.errors;import java.util.List;import java.util.Map;-/** 403 Forbidden — the API key's role is insufficient for this endpoint. */+/** 403 Forbidden: the API key's role or scope (session, IP or chat allow-list) refuses the call. */public class OpenWAForbiddenError extends OpenWAApiError {public OpenWAForbiddenError(String message, int status, Object body, String errorKind) {super(message, status, body, errorKind);diff --git a/sdk/javascript/src/errors.ts b/sdk/javascript/src/errors.tsindex 47086d34d..4f625ce6e 100644--- a/sdk/javascript/src/errors.ts+++ b/sdk/javascript/src/errors.ts@@ -83,7 +83,7 @@ export class OpenWAApiError extends OpenWAError {/** 401 Unauthorized — missing or invalid API key. */export class OpenWAAuthError extends OpenWAApiError {}-/** 403 Forbidden — the API key's role is insufficient for this endpoint. */+/** 403 Forbidden: the API key's role or scope (session, IP or chat allow-list) refuses the call. */export class OpenWAForbiddenError extends OpenWAApiError {}/** 404 Not Found. */export class OpenWANotFoundError extends OpenWAApiError {}diff --git a/sdk/php/src/Exceptions/OpenWAForbiddenException.php b/sdk/php/src/Exceptions/OpenWAForbiddenException.phpindex 074f6f34e..abcb249e1 100644--- a/sdk/php/src/Exceptions/OpenWAForbiddenException.php+++ b/sdk/php/src/Exceptions/OpenWAForbiddenException.php@@ -4,7 +4,7 @@ declare(strict_types=1);namespace OpenWA\Exceptions;-/** 403 Forbidden — the API key's role is insufficient. */+/** 403 Forbidden: the API key's role or scope (session, IP or chat allow-list) refuses the call. */class OpenWAForbiddenException extends OpenWAApiException{}diff --git a/sdk/python/openwa/errors.py b/sdk/python/openwa/errors.pyindex e273d02f8..52ec63176 100644--- a/sdk/python/openwa/errors.py+++ b/sdk/python/openwa/errors.py@@ -82,7 +82,7 @@ class OpenWAAuthError(OpenWAApiError):class OpenWAForbiddenError(OpenWAApiError):- """403 Forbidden — insufficient role."""+ """403 Forbidden: the API key's role or scope (session, IP or chat allow-list) refuses the call."""class OpenWANotFoundError(OpenWAApiError):