diff --git a/.env.example b/.env.example index a570666..5a45449 100644 --- a/.env.example +++ b/.env.example @@ -30,8 +30,8 @@ SMS_GAMA_BASE_URL=https://sms.igama.ir/api/v1 SMS_GAMA_USERNAME= SMS_GAMA_PASSWORD= SMS_GAMA_SOURCE_SERVICE=5000110005 -# Optional: advertising / unverified-template shortcode (default 9000590009) -SMS_GAMA_SOURCE_ADVERTISE=9000590009 +# Optional: advertising / unverified-template shortcode (default 5000990009) +SMS_GAMA_SOURCE_ADVERTISE=5000990009 # Partner gateway: domain:apiKey pairs, comma-separated (www. is stripped) # Example: SMS_PARTNERS=baloutpastry.com:replace-with-long-random-secret SMS_PARTNERS= diff --git a/docs/PROJECT_CONTEXT.md b/docs/PROJECT_CONTEXT.md index a972544..cc6c32b 100644 --- a/docs/PROJECT_CONTEXT.md +++ b/docs/PROJECT_CONTEXT.md @@ -453,7 +453,7 @@ Each resource typically has: `read`, `create`, `update`, `delete` (+ `publish` f - Dashboard SSO: `POST /auth/handoff` (JWT) stores a one-time Redis ticket (`sso:handoff:{ticket}`, 60s). Business dashboard calls `POST /auth/handoff/consume` and receives tokens. - JWT payload: `sub`, `cellNumber`, `roles`, `dashboard`, `type` - SMS provider: Gama (`sms.igama.ir`) SendQuick via service shortcode (`SMS_GAMA_*`) -- Partner gateway (external sites like Balout): `POST /api/v1/public/sms/send` with `X-Api-Key` + body `{ domain, to, message, source? }`; default sender advertising `9000590009`; partners configured in `SMS_PARTNERS` (`domain:apiKey` pairs). Rate limits: 30/partner/min and 5/destination/min. Not part of storefront website-api docs. +- Partner gateway (external sites like Balout): `POST /api/v1/public/sms/send` with `X-Api-Key` + body `{ domain, to, message, source? }`; default sender advertising `5000990009`; partners configured in `SMS_PARTNERS` (`domain:apiKey` pairs). Rate limits: 30/partner/min and 5/destination/min. Not part of storefront website-api docs. --- diff --git a/docs/website-api/SMS.md b/docs/website-api/SMS.md index 37129ba..dc8ce6e 100644 --- a/docs/website-api/SMS.md +++ b/docs/website-api/SMS.md @@ -24,7 +24,7 @@ X-Api-Key: | `domain` | yes | Allowlisted partner apex, e.g. `baloutpastry.com` (`www.` is stripped) | | `to` | yes | Mobile: `09…`, `9…`, `+989…`, or `989…` | | `message` | yes | Free text, max 700 characters | -| `source` | no | Gama shortcode override (8–16 digits). Default: advertising `9000590009` | +| `source` | no | Gama shortcode override (8–16 digits). Default: advertising `5000990009` | ### Example (Balout) @@ -73,7 +73,7 @@ First allowlisted partner: **baloutpastry.com**. ## Sender line (v1) -Default sender is the **advertising** shortcode (`9000590009` / `SMS_GAMA_SOURCE_ADVERTISE`). +Default sender is the **advertising** shortcode (`5000990009` / `SMS_GAMA_SOURCE_ADVERTISE`). Pass `source` to override (e.g. a business-owned shortcode). OTP/login on Meshkee dashboards uses the **service** shortcode (`5000110005`) via `/auth/send-otp`, not this partner endpoint. --- diff --git a/src/auth/sms.service.ts b/src/auth/sms.service.ts index 55d00e3..0c8b5ae 100644 --- a/src/auth/sms.service.ts +++ b/src/auth/sms.service.ts @@ -21,7 +21,7 @@ export type SmsSendOptions = { }; /** Default Meshkee advertising shortcode when a business has no own SMS number. */ -export const DEFAULT_ADVERTISING_SMS_SOURCE = '9000590009'; +export const DEFAULT_ADVERTISING_SMS_SOURCE = '5000990009'; /** Gama batch size limit is undocumented; keep chunks conservative. */ const GAMA_BULK_CHUNK_SIZE = 100; diff --git a/src/website-docs/static/SMS.md b/src/website-docs/static/SMS.md index 37129ba..dc8ce6e 100644 --- a/src/website-docs/static/SMS.md +++ b/src/website-docs/static/SMS.md @@ -24,7 +24,7 @@ X-Api-Key: | `domain` | yes | Allowlisted partner apex, e.g. `baloutpastry.com` (`www.` is stripped) | | `to` | yes | Mobile: `09…`, `9…`, `+989…`, or `989…` | | `message` | yes | Free text, max 700 characters | -| `source` | no | Gama shortcode override (8–16 digits). Default: advertising `9000590009` | +| `source` | no | Gama shortcode override (8–16 digits). Default: advertising `5000990009` | ### Example (Balout) @@ -73,7 +73,7 @@ First allowlisted partner: **baloutpastry.com**. ## Sender line (v1) -Default sender is the **advertising** shortcode (`9000590009` / `SMS_GAMA_SOURCE_ADVERTISE`). +Default sender is the **advertising** shortcode (`5000990009` / `SMS_GAMA_SOURCE_ADVERTISE`). Pass `source` to override (e.g. a business-owned shortcode). OTP/login on Meshkee dashboards uses the **service** shortcode (`5000110005`) via `/auth/send-otp`, not this partner endpoint. ---